-
-
Notifications
You must be signed in to change notification settings - Fork 806
/
Copy pathrepl.txt
40 lines (31 loc) · 1.08 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
{{alias}}( x, value )
Fills an input ndarray with a specified value.
If `value` is a number and `x` has a complex data type, the function fills
an input ndarray with a complex number whose real component equals the
provided scalar `value` and whose imaginary component is zero.
The function *mutates* the input ndarray.
Parameters
----------
x: ndarrayLike
Input ndarray.
value: any
Scalar value. Must be able to safely cast to the input ndarray data
type. Scalar values having floating-point data types (both real and
complex) are allowed to downcast to a lower precision data type of the
same kind (e.g., a scalar double-precision floating-point number can be
used to fill a 'float32' input ndarray).
Returns
-------
out: ndarrayLike
Input ndarray.
Examples
--------
> var opts = { 'dtype': 'float64' };
> var x = {{alias:@stdlib/ndarray/zeros}}( [ 2, 2 ], opts );
> x.get( 0, 0 )
0.0
> {{alias}}( x, 10.0 );
> x.get( 0, 0 )
10.0
See Also
--------