-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepl.txt
140 lines (103 loc) · 2.89 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{{alias}}( [dtype] )
Creates a filled array.
Parameters
----------
dtype: string (optional)
Data type. Default: 'float64'.
Returns
-------
out: TypedArray|Array
Output array.
Examples
--------
> var arr = {{alias}}()
<Float64Array>
> arr = {{alias}}( 'float32' )
<Float32Array>
{{alias}}( value, length[, dtype] )
Returns a filled array having a specified length.
Parameters
----------
value: any
Fill value.
length: integer
Array length.
dtype: string (optional)
Data type. Default: 'float64'.
Returns
-------
out: TypedArray|Array
Output array.
Examples
--------
> var arr = {{alias}}( 1.0, 5 )
<Float64Array>[ 1.0, 1.0, 1.0, 1.0, 1.0 ]
> arr = {{alias}}( 1, 5, 'int32' )
<Int32Array>[ 1, 1, 1, 1, 1 ]
{{alias}}( value, array[, dtype] )
Creates a filled array from another array (or array-like object).
Parameters
----------
value: any
Fill value.
array: ArrayLikeObject
Array from which to generate another array.
dtype: string (optional)
Data type. Default: 'float64'.
Returns
-------
out: TypedArray|Array
Output array.
Examples
--------
> var arr1 = {{alias}}( 2.0, [ 0.5, 0.5, 0.5 ] )
<Float64Array>[ 2.0, 2.0, 2.0 ]
> var arr2 = {{alias}}( 1.0, arr1, 'float32' )
<Float32Array>[ 1.0, 1.0, 1.0 ]
{{alias}}( value, iterable[, dtype] )
Creates a filled array from an iterable.
Parameters
----------
value: any
Fill value.
iterable: Iterable
Iterable from which to generate an array.
dtype: string (optional)
Data type. Default: 'float64'.
Returns
-------
out: TypedArray|Array
Output array.
Examples
--------
> var arr1 = {{alias:@stdlib/iter/constant}}( 3.0, {'iter': 3} );
> var arr2 = {{alias}}( 1.0, arr1, 'float32' )
<Float32Array>[ 1.0, 1.0, 1.0 ]
{{alias}}( value, buffer[, byteOffset[, length]][, dtype] )
Returns a filled typed array view of an ArrayBuffer.
The 'generic' array data type is *not* supported.
Parameters
----------
value: any
Fill value.
buffer: ArrayBuffer
Underlying ArrayBuffer.
byteOffset: integer (optional)
Integer byte offset specifying the location of the first typed array
element. Default: 0.
length: integer (optional)
View length. If not provided, the view spans from the byteOffset to
the end of the underlying ArrayBuffer.
dtype: string (optional)
Data type. Default: 'float64'.
Returns
-------
out: TypedArray
A typed array.
Examples
--------
> var buf = new {{alias:@stdlib/array/buffer}}( 16 );
> var arr = {{alias}}( 1.0, buf, 0, 4, 'float32' )
<Float32Array>[ 1.0, 1.0, 1.0, 1.0 ]
See Also
--------