diff --git a/src/Clustering/KMeans/Cluster.php b/src/Clustering/KMeans/Cluster.php index fa73e4b..f4c3d3e 100644 --- a/src/Clustering/KMeans/Cluster.php +++ b/src/Clustering/KMeans/Cluster.php @@ -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();