From 061d09238764a371f6a91eb3f6d527467061826f Mon Sep 17 00:00:00 2001 From: Yiyan66 Date: Thu, 14 Nov 2019 05:15:23 +0000 Subject: [PATCH] change something --- python/mxnet/ndarray/numpy/_op.py | 5 +++-- python/mxnet/numpy/multiarray.py | 5 +++-- python/mxnet/symbol/numpy/_symbol.py | 5 +++-- src/operator/mshadow_op.h | 3 +-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/python/mxnet/ndarray/numpy/_op.py b/python/mxnet/ndarray/numpy/_op.py index e1d62f8d96d5..96ecea996e3c 100644 --- a/python/mxnet/ndarray/numpy/_op.py +++ b/python/mxnet/ndarray/numpy/_op.py @@ -36,10 +36,10 @@ 'linspace', 'logspace', 'expand_dims', 'tile', 'arange', 'split', 'vsplit', 'concatenate', 'append', 'stack', 'vstack', 'column_stack', 'dstack', 'mean', 'maximum', 'minimum', 'swapaxes', 'clip', 'argmax', 'argmin', 'std', 'var', 'indices', 'copysign', 'ravel', 'hanning', 'hamming', 'blackman', 'flip', - 'around', 'hypot', 'rad2deg', 'deg2rad', 'unique', 'lcm', 'tril', 'identity', 'take', + 'around', 'hypot', 'rad2deg', 'deg2rad', 'unique', 'lcm', 'bitwise_or', 'tril', 'identity', 'take', 'ldexp', 'vdot', 'inner', 'outer', 'equal', 'not_equal', 'greater', 'less', 'greater_equal', 'less_equal', 'hsplit', 'rot90', 'einsum', 'true_divide', 'nonzero', 'shares_memory', 'may_share_memory', 'diff', 'resize', - 'nan_to_num','bitwise_or'] + 'nan_to_num'] @set_module('mxnet.ndarray.numpy') @@ -1148,6 +1148,7 @@ def lcm(x1, x2, out=None, **kwargs): array([ 0, 20, 20, 60, 20, 20], dtype=int64) """ return _ufunc_helper(x1, x2, _npi.lcm, _np.lcm, _npi.lcm_scalar, None, out) + @set_module('mxnet.ndarray.numpy') @wrap_np_binary_func diff --git a/python/mxnet/numpy/multiarray.py b/python/mxnet/numpy/multiarray.py index a11a02c0de85..ff8c659d65c9 100644 --- a/python/mxnet/numpy/multiarray.py +++ b/python/mxnet/numpy/multiarray.py @@ -54,10 +54,10 @@ 'tensordot', 'histogram', 'eye', 'linspace', 'logspace', 'expand_dims', 'tile', 'arange', 'split', 'vsplit', 'concatenate', 'stack', 'vstack', 'column_stack', 'dstack', 'mean', 'maximum', 'minimum', 'swapaxes', 'clip', 'argmax', 'argmin', 'std', 'var', 'indices', 'copysign', 'ravel', 'hanning', 'hamming', - 'blackman', 'flip', 'around', 'arctan2', 'hypot', 'rad2deg', 'deg2rad', 'unique', 'lcm', 'tril', + 'blackman', 'flip', 'around', 'arctan2', 'hypot', 'rad2deg', 'deg2rad', 'unique', 'lcm', 'bitwise_or', 'tril', 'identity', 'take', 'ldexp', 'vdot', 'inner', 'outer', 'equal', 'not_equal', 'greater', 'less', 'greater_equal', 'less_equal', 'hsplit', 'rot90', 'einsum', 'true_divide', 'nonzero', 'shares_memory', - 'may_share_memory', 'diff', 'resize', 'nan_to_num','bitwise_or'] + 'may_share_memory', 'diff', 'resize', 'nan_to_num'] # Return code for dispatching indexing function call _NDARRAY_UNSUPPORTED_INDEXING = -1 @@ -2749,6 +2749,7 @@ def lcm(x1, x2, out=None, **kwargs): """ return _mx_nd_np.lcm(x1, x2, out=out) + @set_module('mxnet.numpy') @wrap_np_binary_func def bitwise_or(x1, x2, out=None, **kwargs): diff --git a/python/mxnet/symbol/numpy/_symbol.py b/python/mxnet/symbol/numpy/_symbol.py index bc29e607ef1a..c5b0cf9959bf 100644 --- a/python/mxnet/symbol/numpy/_symbol.py +++ b/python/mxnet/symbol/numpy/_symbol.py @@ -38,10 +38,10 @@ 'linspace', 'logspace', 'expand_dims', 'tile', 'arange', 'split', 'vsplit', 'concatenate', 'append', 'stack', 'vstack', 'column_stack', 'dstack', 'mean', 'maximum', 'minimum', 'swapaxes', 'clip', 'argmax', 'argmin', 'std', 'var', 'indices', 'copysign', 'ravel', 'hanning', 'hamming', 'blackman', 'flip', - 'around', 'hypot', 'rad2deg', 'deg2rad', 'unique', 'lcm', 'tril', 'identity', 'take', + 'around', 'hypot', 'rad2deg', 'deg2rad', 'unique', 'lcm', 'bitwise_or', 'tril', 'identity', 'take', 'ldexp', 'vdot', 'inner', 'outer', 'equal', 'not_equal', 'greater', 'less', 'greater_equal', 'less_equal', 'hsplit', 'rot90', 'einsum', 'true_divide', 'shares_memory', 'may_share_memory', 'diff', - 'resize', 'nan_to_num','bitwise_or'] + 'resize', 'nan_to_num'] def _num_outputs(sym): @@ -1209,6 +1209,7 @@ def lcm(x1, x2, out=None, **kwargs): gcd : The greatest common divisor """ return _ufunc_helper(x1, x2, _npi.lcm, _np.lcm, _npi.lcm_scalar, None, out) + @set_module('mxnet.symbol.numpy') @wrap_np_binary_func diff --git a/src/operator/mshadow_op.h b/src/operator/mshadow_op.h index bc24ef335b1a..5c4fff437145 100644 --- a/src/operator/mshadow_op.h +++ b/src/operator/mshadow_op.h @@ -1332,7 +1332,7 @@ struct bitwise_or : public mxnet_op::tunable { MSHADOW_XINLINE static typename enable_if::value, DType>::type Map(DType a, DType b) { DType c; - c= a | b; + c = a | b; return c; } template @@ -1342,7 +1342,6 @@ struct bitwise_or : public mxnet_op::tunable { } }; - } // namespace mshadow_op } // namespace op } // namespace mxnet