-
-
Notifications
You must be signed in to change notification settings - Fork 804
/
Copy pathrepl.txt
42 lines (34 loc) · 829 Bytes
/
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
{{alias}}( x )
Returns an array without singleton dimensions.
If a provided ndarray does not have any singleton dimensions, the function
returns the provided ndarray unchanged.
If a provided ndarray does have singleton dimensions, the function returns a
new ndarray view.
Parameters
----------
x: ndarray
Input array.
Returns
-------
out: ndarray
Squeezed array.
Examples
--------
> var x = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ], { 'ndmin': 5 } )
<ndarray>
> var sh = x.shape
[ 1, 1, 1, 2, 2 ]
> var y = {{alias}}( x )
<ndarray>
> sh = y.shape
[ 2, 2 ]
> var v = y.get( 0, 0 )
1
> v = y.get( 0, 1 )
2
> v = y.get( 1, 0 )
3
> v = y.get( 1, 1 )
4
See Also
--------