mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-21 20:45:10 +00:00
Properly check cluster points label (#323)
This commit is contained in:
parent
53c5a6b9e5
commit
f2dd40cb6f
@ -31,7 +31,7 @@ class Cluster extends Point implements IteratorAggregate
|
||||
{
|
||||
$points = [];
|
||||
foreach ($this->points as $point) {
|
||||
if (count($point->label) === 0) {
|
||||
if ($point->label === null) {
|
||||
$points[] = $point->toArray();
|
||||
} else {
|
||||
$points[$point->label] = $point->toArray();
|
||||
|
Loading…
Reference in New Issue
Block a user