Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ndarray/base/zeros-like/docs/types/index.d"

Index

Functions

Functions

zerosLike

  • Creates a zero-filled array having the same shape and data type as a provided input ndarray.

    Parameters

    Returns float64ndarray

    zero-filled array

    Example

    var zeros = require( `@stdlib/ndarray/base/zeros` );
    
    var x = zeros( 'float64', [ 2, 2 ], 'row-major' );
    // returns <ndarray>
    
    var sh = x.shape;
    // returns [ 2, 2 ]
    
    var dt = x.dtype;
    // returns 'float64'
    
    var y = zerosLike( x );
    // returns <ndarray>
    
    sh = y.shape;
    // returns [ 2, 2 ]
    
    dt = y.dtype;
    // returns 'float64'
  • Creates a zero-filled array having the same shape and data type as a provided input ndarray.

    Parameters

    Returns float32ndarray

    zero-filled array

    Example

    var zeros = require( `@stdlib/ndarray/base/zeros` );
    
    var x = zeros( 'float32', [ 2, 2 ], 'row-major' );
    // returns <ndarray>
    
    var sh = x.shape;
    // returns [ 2, 2 ]
    
    var dt = x.dtype;
    // returns 'float32'
    
    var y = zerosLike( x );
    // returns <ndarray>
    
    sh = y.shape;
    // returns [ 2, 2 ]
    
    dt = y.dtype;
    // returns 'float32'
  • Creates a zero-filled array having the same shape and data type as a provided input ndarray.

    Parameters

    Returns complex128ndarray

    zero-filled array

    Example

    var zeros = require( `@stdlib/ndarray/base/zeros` );
    
    var x = zeros( 'complex128', [ 2, 2 ], 'row-major' );
    // returns <ndarray>
    
    var sh = x.shape;
    // returns [ 2, 2 ]
    
    var dt = x.dtype;
    // returns 'complex128'
    
    var y = zerosLike( x );
    // returns <ndarray>
    
    sh = y.shape;
    // returns [ 2, 2 ]
    
    dt = y.dtype;
    // returns 'complex128'
  • Creates a zero-filled array having the same shape and data type as a provided input ndarray.

    Parameters

    Returns complex64ndarray

    zero-filled array

    Example

    var zeros = require( `@stdlib/ndarray/base/zeros` );
    
    var x = zeros( 'complex64', [ 2, 2 ], 'row-major' );
    // returns <ndarray>
    
    var sh = x.shape;
    // returns [ 2, 2 ]
    
    var dt = x.dtype;
    // returns 'complex64'
    
    var y = zerosLike( x );
    // returns <ndarray>
    
    sh = y.shape;
    // returns [ 2, 2 ]
    
    dt = y.dtype;
    // returns 'complex64'
  • Creates a zero-filled array having the same shape and data type as a provided input ndarray.

    Parameters

    Returns int32ndarray

    zero-filled array

    Example

    var zeros = require( `@stdlib/ndarray/base/zeros` );
    
    var x = zeros( 'int32', [ 2, 2 ], 'row-major' );
    // returns <ndarray>
    
    var sh = x.shape;
    // returns [ 2, 2 ]
    
    var dt = x.dtype;
    // returns 'int32'
    
    var y = zerosLike( x );
    // returns <ndarray>
    
    sh = y.shape;
    // returns [ 2, 2 ]
    
    dt = y.dtype;
    // returns 'int32'
  • Creates a zero-filled array having the same shape and data type as a provided input ndarray.

    Parameters

    Returns int16ndarray

    zero-filled array

    Example

    var zeros = require( `@stdlib/ndarray/base/zeros` );
    
    var x = zeros( 'int16', [ 2, 2 ], 'row-major' );
    // returns <ndarray>
    
    var sh = x.shape;
    // returns [ 2, 2 ]
    
    var dt = x.dtype;
    // returns 'int16'
    
    var y = zerosLike( x );
    // returns <ndarray>
    
    sh = y.shape;
    // returns [ 2, 2 ]
    
    dt = y.dtype;
    // returns 'int16'
  • Creates a zero-filled array having the same shape and data type as a provided input ndarray.

    Parameters

    Returns int8ndarray

    zero-filled array

    Example

    var zeros = require( `@stdlib/ndarray/base/zeros` );
    
    var x = zeros( 'int8', [ 2, 2 ], 'row-major' );
    // returns <ndarray>
    
    var sh = x.shape;
    // returns [ 2, 2 ]
    
    var dt = x.dtype;
    // returns 'int8'
    
    var y = zerosLike( x );
    // returns <ndarray>
    
    sh = y.shape;
    // returns [ 2, 2 ]
    
    dt = y.dtype;
    // returns 'int8'
  • Creates a zero-filled array having the same shape and data type as a provided input ndarray.

    Parameters

    Returns uint32ndarray

    zero-filled array

    Example

    var zeros = require( `@stdlib/ndarray/base/zeros` );
    
    var x = zeros( 'uint32', [ 2, 2 ], 'row-major' );
    // returns <ndarray>
    
    var sh = x.shape;
    // returns [ 2, 2 ]
    
    var dt = x.dtype;
    // returns 'uint32'
    
    var y = zerosLike( x );
    // returns <ndarray>
    
    sh = y.shape;
    // returns [ 2, 2 ]
    
    dt = y.dtype;
    // returns 'uint32'
  • Creates a zero-filled array having the same shape and data type as a provided input ndarray.

    Parameters

    Returns uint16ndarray

    zero-filled array

    Example

    var zeros = require( `@stdlib/ndarray/base/zeros` );
    
    var x = zeros( 'uint16', [ 2, 2 ], 'row-major' );
    // returns <ndarray>
    
    var sh = x.shape;
    // returns [ 2, 2 ]
    
    var dt = x.dtype;
    // returns 'uint16'
    
    var y = zerosLike( x );
    // returns <ndarray>
    
    sh = y.shape;
    // returns [ 2, 2 ]
    
    dt = y.dtype;
    // returns 'uint16'
  • Creates a zero-filled array having the same shape and data type as a provided input ndarray.

    Parameters

    Returns uint8ndarray

    zero-filled array

    Example

    var zeros = require( `@stdlib/ndarray/base/zeros` );
    
    var x = zeros( 'uint8', [ 2, 2 ], 'row-major' );
    // returns <ndarray>
    
    var sh = x.shape;
    // returns [ 2, 2 ]
    
    var dt = x.dtype;
    // returns 'uint8'
    
    var y = zerosLike( x );
    // returns <ndarray>
    
    sh = y.shape;
    // returns [ 2, 2 ]
    
    dt = y.dtype;
    // returns 'uint8'
  • Creates a zero-filled array having the same shape and data type as a provided input ndarray.

    Parameters

    Returns uint8cndarray

    zero-filled array

    Example

    var zeros = require( `@stdlib/ndarray/base/zeros` );
    
    var x = zeros( 'uint8c', [ 2, 2 ], 'row-major' );
    // returns <ndarray>
    
    var sh = x.shape;
    // returns [ 2, 2 ]
    
    var dt = x.dtype;
    // returns 'uint8c'
    
    var y = zerosLike( x );
    // returns <ndarray>
    
    sh = y.shape;
    // returns [ 2, 2 ]
    
    dt = y.dtype;
    // returns 'uint8c'
  • Creates a zero-filled array having the same shape and data type as a provided input ndarray.

    Parameters

    Returns typedndarray < number >

    zero-filled array

    Example

    var zeros = require( `@stdlib/ndarray/base/zeros` );
    
    var x = zeros( 'generic', [ 2, 2 ], 'row-major' );
    // returns <ndarray>
    
    var sh = x.shape;
    // returns [ 2, 2 ]
    
    var dt = x.dtype;
    // returns 'generic'
    
    var y = zerosLike( x );
    // returns <ndarray>
    
    sh = y.shape;
    // returns [ 2, 2 ]
    
    dt = y.dtype;
    // returns 'generic'