Returns evenly spaced values within a given interval.
Returns evenly spaced values within a given interval.
Values are generated within the half-open interval [start
, stop
). In other
words, the interval includes start
but excludes stop
.
Start of interval. The default start value is 0.
End of interval.
Spacing between values. The default step size is 1.
Number of times to repeat each element. The default repeat count is 1.
Device context. Default context is the current default context.
The data type of the NDArray
. The default datatype is DType.Float32
.
NDArray of evenly spaced values in the specified range.
Create a new NDArray that copies content from source_array.
Create a new NDArray that copies content from source_array.
Source data to create NDArray from.
shape of the NDArray
The context of the NDArray, default to current default context.
The created NDArray.
Concatenate a list of NDArrays along the specified dimension.
Concatenate a list of NDArrays along the specified dimension.
Arrays to be concatenate. They must have identical shape except the first dimension. They also must have the same data type.
The axis along which to concatenate.
Default True
. When not True
,
if the arrays only contain one NDArray
,
that element will be returned directly, avoid copying.
An NDArray
that lives on the same context as arrays[0].context
.
Create an empty uninitialized new NDArray, with specified shape.
Create an empty uninitialized new NDArray, with specified shape.
shape of the NDArray.
The context of the NDArray, default to current default context.
The created NDArray.
Returns the result of element-wise **equal to** (==) comparison operation with broadcasting.
Returns the result of element-wise **equal to** (==) comparison operation with broadcasting. For each element in input arrays, return 1(true) if corresponding elements are same, otherwise return 0(false).
Create a new NDArray filled with given value, with specified shape.
Create a new NDArray filled with given value, with specified shape.
shape of the NDArray.
value to be filled with
The context of the NDArray, default to current default context
Returns the result of element-wise **greater than** (>) comparison operation with broadcasting.
Returns the result of element-wise **greater than** (>) comparison operation with broadcasting. For each element in input arrays, return 1(true) if lhs elements are greater than rhs, otherwise return 0(false).
Returns the result of element-wise **greater than or equal to** (>=) comparison operation with broadcasting.
Returns the result of element-wise **greater than or equal to** (>=) comparison operation with broadcasting. For each element in input arrays, return 1(true) if lhs elements are greater than equal to rhs, otherwise return 0(false).
Returns the result of element-wise **lesser than** (<) comparison operation with broadcasting.
Returns the result of element-wise **lesser than** (<) comparison operation with broadcasting. For each element in input arrays, return 1(true) if lhs elements are less than rhs, otherwise return 0(false).
Returns the result of element-wise **lesser than or equal to** (<=) comparison operation with broadcasting.
Returns the result of element-wise **lesser than or equal to** (<=) comparison operation with broadcasting. For each element in input arrays, return 1(true) if lhs elements are lesser than equal to rhs, otherwise return 0(false).
Load ndarray from binary file.
Load ndarray from binary file.
You can also use pickle to do the job if you only work on python. The advantage of load/save is the file is language agnostic. This means the file saved using save can be loaded by other language binding of mxnet. You also get the benefit being able to directly load/save from cloud storage(S3, HDFS)
The name of the file.Can be S3 or HDFS address (remember built with S3 support). Example of fname:
s3://my-bucket/path/my-s3-ndarray
hdfs://my-bucket/path/my-hdfs-ndarray
/path-to/my-local-ndarray
dict of str->NDArray to be saved
Returns the result of element-wise **not equal to** (!=) comparison operation with broadcasting.
Returns the result of element-wise **not equal to** (!=) comparison operation with broadcasting. For each element in input arrays, return 1(true) if corresponding elements are different, otherwise return 0(false).
One hot encoding indices into matrix out.
One hot encoding indices into matrix out.
An NDArray containing indices of the categorical features.
The result holder of the encoding.
Same as out.
Create a new NDArray filled with 1, with specified shape.
Create a new NDArray filled with 1, with specified shape.
shape of the NDArray.
The context of the NDArray, default to current default context.
The created NDArray.
Save list of NDArray or dict of str->NDArray to binary file.
Save list of NDArray or dict of str->NDArray to binary file.
You can also use pickle to do the job if you only work on python. The advantage of load/save is the file is language agnostic. This means the file saved using save can be loaded by other language binding of mxnet. You also get the benefit being able to directly load/save from cloud storage(S3, HDFS)
The name of the file.Can be S3 or HDFS address (remember built with S3 support). Example of fname:
s3://my-bucket/path/my-s3-ndarray
hdfs://my-bucket/path/my-hdfs-ndarray
/path-to/my-local-ndarray
dict of str->NDArray
Wait all async operation to finish in MXNet This function is used for benchmark only
Create a new NDArray filled with 0, with specified shape.
Create a new NDArray filled with 0, with specified shape.
shape of the NDArray.
The context of the NDArray, default to current default context.
The created NDArray.
NDArray API of mxnet