Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,31 @@
Examples
--------
// Standard Usage:
> var x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0 ] );
> var out = new {{alias:@stdlib/array/complex128}}( 2 );
> var x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
> var out = new {{alias:@stdlib/array/complex128}}( 8 );
> {{alias}}( 'row-major', x.length, x, 1, out, 2 )
<Complex128Array>[ 1.0, 2.0, 1.0, 2.0 ]
<Complex128Array>
> var z = out.get( 2 )
<Complex128>[ 1.0, 2.0 ]
> z = out.get( 3 )
<Complex128>[ 3.0, 4.0 ]

// Using `N` and stride parameters:
> x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
> out = new {{alias:@stdlib/array/complex128}}( 2 );
> {{alias}}( 'row-major', 1, x, 2, out, 2 )
<Complex128Array>[ 1.0, 2.0, 1.0, 2.0 ]
> x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 0.0, 0.0, 3.0, 4.0, 0.0, 0.0 ] );
> out = new {{alias:@stdlib/array/complex128}}( 8 );
> {{alias}}( 'row-major', 2, x, 2, out, 2 )
<Complex128Array>
> z = out.get( 3 )
<Complex128>[ 3.0, 4.0 ]

// Using view offsets:
> var x0 = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 1.0, 2.0 ] );
> var x0 = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 1.0, 2.0, 3.0, 4.0 ] );
> var x1 = new {{alias:@stdlib/array/complex128}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
> out = new {{alias:@stdlib/array/complex128}}( 2 );
> {{alias}}( 'row-major', 1, x1, 1, out, 2 )
<Complex128Array>[ 1.0, 2.0, 1.0, 2.0 ]
> out = new {{alias:@stdlib/array/complex128}}( 8 );
> {{alias}}( 'row-major', 2, x1, 1, out, 2 )
<Complex128Array>
> z = out.get( 3 )
<Complex128>[ 3.0, 4.0 ]


{{alias}}.ndarray( N, x, sx, ox, out, so1, so2, oo )
Expand Down Expand Up @@ -106,16 +114,22 @@
Examples
--------
// Standard Usage:
> var x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0 ] );
> var out = new {{alias:@stdlib/array/complex128}}( 2 );
> var x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
> var out = new {{alias:@stdlib/array/complex128}}( 8 );
> {{alias}}.ndarray( x.length, x, 1, 0, out, 2, 1, 0 )
<Complex128Array>[ 1.0, 2.0, 1.0, 2.0 ]
<Complex128Array>
> var z = out.get( 2 )
<Complex128>[ 1.0, 2.0 ]
> z = out.get( 3 )
<Complex128>[ 3.0, 4.0 ]

// Using an index offset:
> x = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 1.0, 2.0 ] );
> out = new {{alias:@stdlib/array/complex128}}( 2 );
> {{alias}}.ndarray( 1, x, 1, 1, out, 2, 1, 0 )
<Complex128Array>[ 1.0, 2.0, 1.0, 2.0 ]
> x = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 1.0, 2.0, 3.0, 4.0 ] );
> out = new {{alias:@stdlib/array/complex128}}( 8 );
> {{alias}}.ndarray( 2, x, 1, 1, out, 2, 1, 0 )
<Complex128Array>
> z = out.get( 3 )
<Complex128>[ 3.0, 4.0 ]

See Also
--------
Expand Down