numpy
Applicability
Product |
Supported (Yes/No) |
|---|---|
Atlas 350 Accelerator Card |
No |
Yes |
|
Yes |
|
No |
|
No |
|
No |
Note: For the
Function Description
Obtains the NumPy data of a tensor.
Prototype
1 | numpy(copy=False) |
Parameters
Parameter |
Data Type |
Description |
|---|---|---|
copy |
bool |
The value can be False or True. The default value is False, indicating that tensors are converted into numpy.ndarray and data is not copied. If the value is True, data needs to be copied. If the tensor is of the string type, set this parameter to True. Otherwise, an exception is thrown. |
Example
1 2 | tensor = Tensor(numpy.array([1])) np_arr = tensor.numpy() |
Returns
Returns numpy.array.
Constraints
None