mxnet.numpy.type_functions¶
Type functions for the numpy module.
Functions
|
Returns True if cast between data types can occur according to the casting rule. |
|
Machine limits for floating-point data types. |
|
Machine limits for floating-point data types. |
|
Returns the dtype that results from applying the type promotion rules to the arguments. |
Classes
|
|
|
- mxnet.numpy.type_functions.can_cast(from_, to)[source]¶
Returns True if cast between data types can occur according to the casting rule. If from is a scalar or array scalar, also returns True if the scalar value can be cast without overflow or truncation to an integer.
- mxnet.numpy.type_functions.finfo(dtype)[source]¶
Machine limits for floating-point data types.
Notes
finfo is a standard API in https://data-apis.org/array-api/latest/API_specification/data_type_functions.html#finfo-type instead of an official NumPy operator.
- Parameters:
dtype (ndarray, float or dtype) – Kind of floating point data-type about which to get information.
- Returns:
out –
- an object having the following attributes:
- bitsint
number of bits occupied by the floating-point data type.
- epsfloat
difference between 1.0 and the next smallest representable floating-point number larger than 1.0 according to the IEEE-754 standard.
- maxfloat
largest representable number.
- minfloat
smallest representable number.
- smallest_normalfloat
smallest positive floating-point number with full precision.
- Return type:
finfo object
- mxnet.numpy.type_functions.iinfo(dtype)[source]¶
Machine limits for floating-point data types.
Notes
iinfo is a standard API in https://data-apis.org/array-api/latest/API_specification/data_type_functions.html#iinfo-type instead of an official NumPy operator.
- Parameters:
dtype (ndarray, integer or dtype) – The kind of integer data type to get information about.
- Returns:
out –
- an object having the following attributes:
- bitsint
number of bits occupied by the type
- maxint
largest representable number.
- minint
smallest representable number.
- Return type:
iinfo object
- mxnet.numpy.type_functions.result_type(*arrays_and_dtypes)[source]¶
Returns the dtype that results from applying the type promotion rules to the arguments.
Notes
result_type is a standard API in https://data-apis.org/array-api/latest/API_specification/data_type_functions.html#result-type-arrays-and-dtypes instead of an official NumPy operator.
- Parameters:
arrays_and_dtypes (mixed ndarrays and dtypes) – an arbitrary number of input arrays and/or dtypes.
- Returns:
out – the dtype resulting from an operation involving the input arrays and dtypes.
- Return type:
dtype