Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface Routine {
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a search vector, the function returns `-1` (i.e., an invalid index).
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param order - storage layout
Expand Down Expand Up @@ -64,7 +64,7 @@ interface Routine {
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a search vector, the function returns `-1` (i.e., an invalid index).
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param M - number of rows in `A`
Expand Down Expand Up @@ -100,7 +100,7 @@ interface Routine {
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a search vector, the function returns `-1` (i.e., an invalid index).
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param order - storage layout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var ndarray = require( './ndarray.js' );
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a search vector, the function returns `-1` (i.e., an invalid index).
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param {string} order - storage layout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' );
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a search vector, the function returns `-1` (i.e., an invalid index).
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param {PositiveInteger} M - number of rows in `A`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface Routine {
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a search vector, the function returns `-1` (i.e., an invalid index).
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param order - storage layout
Expand Down Expand Up @@ -64,7 +64,7 @@ interface Routine {
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a search vector, the function returns `-1` (i.e., an invalid index).
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param M - number of rows in `A`
Expand Down Expand Up @@ -100,7 +100,7 @@ interface Routine {
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a search vector, the function returns `-1` (i.e., an invalid index).
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param order - storage layout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a search vector, the function returns `-1` (i.e., an invalid index).
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param {PositiveInteger} M - number of rows in `A`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var ndarray = require( './ndarray.js' );
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a search vector, the function returns `-1` (i.e., an invalid index).
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param {string} order - storage layout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

// MODULES //

var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
var objectInverse = require( '@stdlib/object/inverse' );
var enumeration = require( '@stdlib/ml/base/kmeans/algorithms' ).enum;

Expand Down Expand Up @@ -51,7 +50,7 @@ var hash = objectInverse( enumeration(), {
*/
function enum2str( value ) {
var v = hash[ value ];
return ( isString( v ) ) ? v : null; // note: we include this guard to prevent walking the prototype chain
return ( typeof v === 'string' ) ? v : null; // note: we include this guard to prevent walking the prototype chain
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

// MODULES //

var isNumber = require( '@stdlib/assert/is-number' ).isPrimitive;
var enumeration = require( '@stdlib/ml/base/kmeans/algorithms' ).enum;


Expand All @@ -47,7 +46,7 @@ var ENUM = enumeration();
*/
function str2enum( algorithm ) {
var v = ENUM[ algorithm ];
return ( isNumber( v ) ) ? v : null; // note: we include this guard to prevent walking the prototype chain
return ( typeof v === 'number' ) ? v : null; // note: we include this guard to prevent walking the prototype chain
}


Expand Down