Skip to content

Commit

Permalink
Properly check cluster points label (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
marmichalski authored and akondas committed Oct 29, 2018
1 parent 53c5a6b commit f2dd40c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Clustering/KMeans/Cluster.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function getPoints(): array
{
$points = [];
foreach ($this->points as $point) {
if (count($point->label) === 0) {
if ($point->label === null) {
$points[] = $point->toArray();
} else {
$points[$point->label] = $point->toArray();
Expand Down

0 comments on commit f2dd40c

Please sign in to comment.