diff --git a/python/mxnet/numpy/utils.py b/python/mxnet/numpy/utils.py index c34650a61f31..7f9d7bec5030 100644 --- a/python/mxnet/numpy/utils.py +++ b/python/mxnet/numpy/utils.py @@ -23,7 +23,7 @@ import numpy as onp __all__ = ['float16', 'float32', 'float64', 'uint8', 'int32', 'int8', 'int64', - 'bool', 'bool_', 'pi', 'inf', 'nan', 'PZERO', 'NZERO', 'newaxis'] + 'bool', 'bool_', 'pi', 'inf', 'nan', 'PZERO', 'NZERO', 'newaxis', 'finfo'] float16 = onp.float16 float32 = onp.float32 @@ -42,3 +42,4 @@ NZERO = onp.NZERO newaxis = None +finfo = onp.finfo diff --git a/src/operator/tensor/broadcast_reduce_op.h b/src/operator/tensor/broadcast_reduce_op.h index 27e22491ca35..8b979c5c460d 100644 --- a/src/operator/tensor/broadcast_reduce_op.h +++ b/src/operator/tensor/broadcast_reduce_op.h @@ -593,7 +593,7 @@ void SearchAxisCompute(const nnvm::NodeAttrs& attrs, } if (input.shape_.Size() == 0U) return; // zero-size tensor mxnet::TShape shape = AxisShapeCompact(input.shape_, &axis, false); - MSHADOW_REAL_TYPE_SWITCH(outputs[0].type_flag_, DType, { + MSHADOW_TYPE_SWITCH(inputs[0].type_flag_, DType, { Tensor out = outputs[0].get_with_shape( Shape2(shape[0], shape[2]), s); Tensor in = input.get_with_shape(