Fill a one-dimensional double-precision complex floating-point ndarray with linearly spaced numeric elements which increment by
1starting from a specified value.
var zunitspace = require( '@stdlib/blas/ext/base/ndarray/zunitspace' );Fills a one-dimensional double-precision complex floating-point ndarray with linearly spaced numeric elements which increment by 1 starting from a specified value.
var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );
var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
var x = new Complex128Vector( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
var start = scalar2ndarray( new Complex128( 3.0, 0.0 ), {
'dtype': 'complex128'
});
var out = zunitspace( [ x, start ] );
// returns <ndarray>[ <Complex128>[ 3.0, 0.0 ], <Complex128>[ 4.0, 0.0 ], <Complex128>[ 5.0, 0.0 ], <Complex128>[ 6.0, 0.0 ] ]The function has the following parameters:
- arrays: array-like object containing a one-dimensional input ndarray and a zero-dimensional ndarray containing a starting value.
- The input ndarray is modified in-place (i.e., the input ndarray is mutated).
var Complex128Vector = require( '@stdlib/ndarray/vector/complex128' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );
var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
var ndarray2array = require( '@stdlib/ndarray/to-array' );
var zunitspace = require( '@stdlib/blas/ext/base/ndarray/zunitspace' );
var x = new Complex128Vector( 10 );
console.log( ndarray2array( x ) );
var start = scalar2ndarray( new Complex128( 3.0, 0.0 ), {
'dtype': 'complex128'
});
zunitspace( [ x, start ] );
console.log( ndarray2array( x ) );