Skip to content

Commit f2dd40c

Browse files
marmichalskiakondas
authored andcommitted
Properly check cluster points label (#323)
1 parent 53c5a6b commit f2dd40c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Clustering/KMeans/Cluster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function getPoints(): array
3131
{
3232
$points = [];
3333
foreach ($this->points as $point) {
34-
if (count($point->label) === 0) {
34+
if ($point->label === null) {
3535
$points[] = $point->toArray();
3636
} else {
3737
$points[$point->label] = $point->toArray();

0 commit comments

Comments
 (0)