lib/ops.js
/**
 * Computes length or magnitude of A, where A is a 1D vector
 */
Computes length or magnitude of A, where A is a 1D vector
Computes length or magnitude of A where A is a 1D vector
function length(A) {
    if (A.shape.length !== 1) {
        throw new Error('A is not a 1D array');
    }
    return Math.sqrt(dot(A, A));
}
function length ( A ) { if ( A . shape . length !== 1 ) { throw new Error ( 'A is not a 1D array' ) ; } return Math . sqrt ( dot ( A , A ) ) ; }
Computes length or magnitude of A, where A is a 1D vector
Computes length or magnitude of A where A is a 1D vector