-
-
Notifications
You must be signed in to change notification settings - Fork 804
/
Copy pathrepl.txt
61 lines (46 loc) · 1.68 KB
/
repl.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{{alias}}( x, ...stop[, options] )
Returns a read-only truncated view of an input ndarray.
The function supports two (mutually exclusive) means of providing ending
indices:
1. Providing a single array containing stop arguments.
2. Providing stop arguments as separate arguments.
An individual stop argument must be either an integer, null, or undefined.
In all cases, the number of stop indices must match the number of array
dimensions.
If providing an array of stop arguments, no other stop arguments should be
provided.
Mixing function invocation styles (e.g., providing an array of stop
arguments followed by additional stop arguments) is not supported.
Parameters
----------
x: ndarray
Input array.
stop: ...null|void|integer
Ending indices (exclusive). If an ending index is either `null` or
`undefined`, the function returns a view containing all elements along
that dimension. A negative integer indicates to resolve an ending index
relative to the last element along a corresponding dimension, with the
last element having index `-1`.
options: Object (optional)
Options.
options.strict: boolean (optional)
Boolean indicating whether to enforce strict bounds checking.
Default: true.
Returns
-------
out: ndarray
Output array view.
Examples
--------
> var x = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] )
<ndarray>
> x.shape
[ 2, 2 ]
> var y = {{alias}}( x, 1, 1 )
<ndarray>
> y.shape
[ 1, 1 ]
> {{alias:@stdlib/ndarray/to-array}}( y )
[ [ 1 ] ]
See Also
--------