Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Philmod committed Oct 24, 2012
1 parent a3abdbb commit 35f5683
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/kmeans.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ exports.clusterize = function(vector, options, callback) {
*/

function clusterize(vector, options, callback) {
if (typeof callback != 'function') throw new Error("Provide a callback function");
if (!callback || typeof callback != 'function') throw new Error("Provide a callback function");
if (!options || !options.k || options.k<1) return callback(new Error("Provide a correct number k of clusters"));
if (!_.isArray(vector)) return callback(new Error("Provide an array of data"));
this.options = options;
Expand Down

0 comments on commit 35f5683

Please sign in to comment.