JSPM

@stdlib/assert-is-float64ndarray-like

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q30475F
  • License Apache-2.0

Test if a value is an ndarray-like object containing double-precision floating-point numbers.

Package Exports

  • @stdlib/assert-is-float64ndarray-like

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stdlib/assert-is-float64ndarray-like) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

isFloat64ndarrayLike

NPM version Build Status Coverage Status dependencies

Test if a value is an ndarray-like object containing double-precision floating-point numbers.

Installation

npm install @stdlib/assert-is-float64ndarray-like

Usage

var isFloat64ndarrayLike = require( '@stdlib/assert-is-float64ndarray-like' );

isFloat64ndarrayLike( value )

Tests if a value is an ndarray-like object whose underlying data type is float64.

var Float64Array = require( '@stdlib/array-float64' );
var ndarray = require( '@stdlib/ndarray-ctor' );

var arr = ndarray( 'float64', new Float64Array( [ 0, 0, 0, 0 ] ), [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );

var bool = isFloat64ndarrayLike( arr );
// returns true

Examples

var ndarray = require( '@stdlib/ndarray-ctor' );
var Float64Array = require( '@stdlib/array-float64' );
var isFloat64ndarrayLike = require( '@stdlib/assert-is-float64ndarray-like' );

var buffer = new Float64Array( [ 0, 0, 0, 0 ] );
var arr = ndarray( 'float64', buffer, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );

var out = isFloat64ndarrayLike( arr );
// returns true

out = isFloat64ndarrayLike( [ 1, 2, 3, 4 ] );
// returns false

out = isFloat64ndarrayLike( {} );
// returns false

out = isFloat64ndarrayLike( null );
// returns false

Notice

This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.

For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.

Community

Chat


License

See LICENSE.

Copyright © 2016-2021. The Stdlib Authors.