Skip to content

Commit 8009603

Browse files
committed
Update REPL text
1 parent 0b4ddcf commit 8009603

File tree

1 file changed

+34
-24
lines changed
  • lib/node_modules/@stdlib/math/strided/special/abs2/docs

1 file changed

+34
-24
lines changed

lib/node_modules/@stdlib/math/strided/special/abs2/docs/repl.txt

+34-24
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
{{alias}}( N, x, strideX, y, strideY )
3-
Computes the squared absolute value for each element in `x` and assigns the
4-
results to elements in `y`.
2+
{{alias}}( N, dtypeX, strideX, dtypeY, strideY )
3+
Computes the squared absolute value for each element in a strided array `x`
4+
and assigns the results to elements in a strided array `y`.
55

66
The `N` and `stride` parameters determine which elements in `x` and `y` are
77
accessed at runtime.
@@ -14,12 +14,18 @@
1414
N: integer
1515
Number of indexed elements.
1616

17+
dtypeX: string
18+
Data type for `x`.
19+
1720
x: ArrayLikeObject
1821
Input array.
1922

2023
strideX: integer
2124
Index increment for `x`.
2225

26+
dtypeY: string
27+
Data type for `y`.
28+
2329
y: ArrayLikeObject
2430
Destination array.
2531

@@ -34,32 +40,31 @@
3440
Examples
3541
--------
3642
// Standard usage:
37-
> var x = new {{alias:@stdlib/array/float64}}( [ -1.0, -2.0, -3.0, -4.0 ] );
43+
> var x = new {{alias:@stdlib/array/float64}}( [ -2.0, 1.0, 3.0, -5.0 ] );
3844
> var y = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0, 0.0, 0.0 ] );
39-
> {{alias}}( x.length, x, 1, y, 1 )
40-
<Float64Array>[ 1.0, 4.0, 9.0, 16.0 ]
45+
> {{alias}}( x.length, 'float64', x, 1, 'float64', y, 1 )
46+
<Float64Array>[ 4.0, 1.0, 9.0, 25.0 ]
4147

4248
// Using `N` and `stride` parameters:
43-
> var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 );
4449
> y = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0, 0.0, 0.0 ] );
45-
> {{alias}}( N, x, 2, y, -1 )
46-
<Float64Array>[ 9.0, 1.0, 0.0, 0.0 ]
50+
> {{alias}}( 2, 'float64', x, 2, 'float64', y, -1 )
51+
<Float64Array>[ 9.0, 4.0, 0.0, 0.0 ]
4752

4853
// Using view offsets:
49-
> var x0 = new {{alias:@stdlib/array/float64}}( [ -1.0, -2.0, -3.0, -4.0 ] );
54+
> var x0 = new {{alias:@stdlib/array/float64}}( [ -2.0, 1.0, 3.0, -5.0 ] );
5055
> var y0 = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0, 0.0, 0.0 ] );
5156
> var x1 = new {{alias:@stdlib/array/float64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
5257
> var y1 = new {{alias:@stdlib/array/float64}}( y0.buffer, y0.BYTES_PER_ELEMENT*2 );
53-
> N = {{alias:@stdlib/math/base/special/floor}}( x0.length / 2 );
54-
> {{alias}}( N, x1, -2, y1, 1 )
55-
<Float64Array>[ 16.0, 4.0 ]
58+
> {{alias}}( 2, 'float64', x1, -2, 'float64', y1, 1 )
59+
<Float64Array>[ 25.0, 1.0 ]
5660
> y0
57-
<Float64Array>[ 0.0, 0.0, 16.0, 4.0 ]
61+
<Float64Array>[ 0.0, 0.0, 25.0, 1.0 ]
5862

5963

60-
{{alias}}.ndarray( N, x, strideX, offsetX, y, strideY, offsetY )
61-
Computes the squared absolute value for each element in `x` and assigns the
62-
results to elements in `y` using alternative indexing semantics.
64+
{{alias}}.ndarray( N, dtypeX, x, strideX, offsetX, dtypeY, y, strideY, offsetY )
65+
Computes the squared absolute value for each element in a strided array `x`
66+
and assigns the results to elements in a strided array `y` using
67+
alternative indexing semantics.
6368

6469
While typed array views mandate a view offset based on the underlying
6570
buffer, the `offsetX` and `offsetY` parameters support indexing semantics
@@ -70,6 +75,9 @@
7075
N: integer
7176
Number of indexed elements.
7277

78+
dtypeX: string
79+
Data type for `x`.
80+
7381
x: ArrayLikeObject
7482
Input array.
7583

@@ -79,6 +87,9 @@
7987
offsetX: integer
8088
Starting index for `x`.
8189

90+
dtypeY: string
91+
Data type for `y`.
92+
8293
y: ArrayLikeObject
8394
Destination array.
8495

@@ -96,17 +107,16 @@
96107
Examples
97108
--------
98109
// Standard usage:
99-
> var x = new {{alias:@stdlib/array/float64}}( [ -1.0, -2.0, -3.0, -4.0 ] );
110+
> var x = new {{alias:@stdlib/array/float64}}( [ -2.0, 1.0, 3.0, -5.0 ] );
100111
> var y = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0, 0.0, 0.0 ] );
101-
> {{alias}}.ndarray( x.length, x, 1, 0, y, 1, 0 )
102-
<Float64Array>[ 1.0, 4.0, 9.0, 16.0 ]
112+
> {{alias}}.ndarray( x.length, 'float64', x, 1, 0, 'float64', y, 1, 0 )
113+
<Float64Array>[ 4.0, 1.0, 9.0, 25.0 ]
103114

104115
// Advanced indexing:
105-
> x = new {{alias:@stdlib/array/float64}}( [ -1.0, -2.0, -3.0, -4.0 ] );
116+
> x = new {{alias:@stdlib/array/float64}}( [ -2.0, 1.0, 3.0, -5.0 ] );
106117
> y = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0, 0.0, 0.0 ] );
107-
> var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 );
108-
> {{alias}}.ndarray( N, x, 2, 1, y, -1, y.length-1 )
109-
<Float64Array>[ 0.0, 0.0, 16.0, 4.0 ]
118+
> {{alias}}.ndarray( 2, 'float64', x, 2, 1, 'float64', y, -1, y.length-1 )
119+
<Float64Array>[ 0.0, 0.0, 25.0, 1.0 ]
110120

111121
See Also
112122
--------

0 commit comments

Comments
 (0)