-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[numpy][tvm] rad2deg && deg2rad #16015
[numpy][tvm] rad2deg && deg2rad #16015
Conversation
python/mxnet/ndarray/numpy/_op.py
Outdated
@@ -32,7 +32,8 @@ | |||
'exp', 'expm1', 'arcsin', 'arccos', 'arctan', 'sign', 'log', 'degrees', 'log2', 'log1p', | |||
'rint', 'radians', 'reciprocal', 'square', 'negative', 'fix', 'ceil', 'floor', | |||
'trunc', 'logical_not', 'arcsinh', 'arccosh', 'arctanh', 'tensordot', | |||
'linspace', 'expand_dims', 'tile', 'arange', 'split', 'concatenate', 'stack'] | |||
'linspace', 'expand_dims', 'tile', 'arange', 'split', 'concatenate', 'stack', 'deg2rad', | |||
'rad2deg'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move 'deg2rad' to after 'radians' and 'rad2deg' to after 'degrees'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for the func declarations within the file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thank you.
(1, 2, 3), | ||
(1, 0), | ||
(2, 0, 3) | ||
]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simply do
for shape in [(), (1,), (1, 1), (1, 2, 3), (1, 0), (2, 0, 3)]:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have put the test into test_np_unary_funcs. Thanks.
39e0f1e
to
a11494b
Compare
Almost LGTM, @yzhliu for double-check. |
3431340
to
d74351b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. please rebase
d74351b
to
36f3a21
Compare
* fix format error * change type * constangt must be tvm.const in tvm and add backward test, do not support float16 * add addto test * handle 0-dim and 0-size * add 0-dim test case * register to npi and add wrapper with doc * change function name, add infer type * fix format error * merge rad2deg to deg2rad * fix error according to review * change infer type * add TVM_OP in test
36f3a21
to
1b154ce
Compare
* fix format error * change type * constangt must be tvm.const in tvm and add backward test, do not support float16 * add addto test * handle 0-dim and 0-size * add 0-dim test case * register to npi and add wrapper with doc * change function name, add infer type * fix format error * merge rad2deg to deg2rad * fix error according to review * change infer type * add TVM_OP in test
* fix format error * change type * constangt must be tvm.const in tvm and add backward test, do not support float16 * add addto test * handle 0-dim and 0-size * add 0-dim test case * register to npi and add wrapper with doc * change function name, add infer type * fix format error * merge rad2deg to deg2rad * fix error according to review * change infer type * add TVM_OP in test
* fix format error * change type * constangt must be tvm.const in tvm and add backward test, do not support float16 * add addto test * handle 0-dim and 0-size * add 0-dim test case * register to npi and add wrapper with doc * change function name, add infer type * fix format error * merge rad2deg to deg2rad * fix error according to review * change infer type * add TVM_OP in test
Numpy operator rad2deg and deg2rad implemented with tam.
@haojin2