@@ -31,7 +31,9 @@ |
||
| 31 | 31 | $niter = 0; |
| 32 | 32 | $maxiter = 100; |
| 33 | 33 | $npoints = count($data); |
| 34 | - if ($npoints <= 0) throw new \Exception("Not enough data. "); |
|
| 34 | + if ($npoints <= 0) { |
|
| 35 | + throw new \Exception("Not enough data. "); |
|
| 36 | + } |
|
| 35 | 37 | $ndimensions = count($data[0]); |
| 36 | 38 | $centroids = []; |
| 37 | 39 | for ($i=0;$i<$nclusters;$i++){ |