mxnet.ndarray.cast¶
-
mxnet.ndarray.
cast
(data=None, dtype=_Null, out=None, name=None, **kwargs)¶ Casts all elements of the input to a new type.
Note
Cast
is deprecated. Usecast
instead.Example:
cast([0.9, 1.3], dtype='int32') = [0, 1] cast([1e20, 11.1], dtype='float16') = [inf, 11.09375] cast([300, 11.1, 10.9, -1, -3], dtype='uint8') = [44, 11, 10, 255, 253]
Defined in src/operator/tensor/elemwise_unary_op_basic.cc:L610