Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "assert/is-float32vector-like/docs/types/index.d"

Index

Functions

Export assignment isFloat32VectorLike

  • isFloat32VectorLike(v: any): boolean
  • Tests if a value is a 1-dimensional ndarray-like object whose underlying data type is float32.

    Parameters

    • v: any

      value to test

    Returns boolean

    boolean indicating if a value is a 1-dimensional ndarray-like object whose underlying data type is float32

    Example

    var Float32Array = require( `@stdlib/array/float32` );
    var ndarray = require( `@stdlib/ndarray/ctor` );
    
    var arr = ndarray( 'float32', new Float32Array( [ 0, 0, 0, 0 ] ), [ 4 ], [ 1 ], 0, 'row-major' );
    
    var bool = isFloat32VectorLike( arr );
    // returns true
    
    bool = isFloat32VectorLike( [] );
    // returns false