You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/02/18 05:57:53 UTC
[GitHub] [incubator-mxnet] Yiyan66 opened a new pull request #17619: [numpy]
add op fabs, sometrue, round_
Yiyan66 opened a new pull request #17619: [numpy] add op fabs, sometrue, round_
URL: https://github.com/apache/incubator-mxnet/pull/17619
## Description ##
add op fabs, sometrue, round_
## Checklist ##
### Essentials ###
Please feel free to remove inapplicable items for your PR.
- [ ] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant [JIRA issue](https://issues.apache.org/jira/projects/MXNET/issues) created (except PRs with tiny changes)
- [ ] Changes are complete (i.e. I finished coding on this PR)
- [ ] All changes have test coverage:
- Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
- Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
- Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
- [ ] Code is well-documented:
- For user-facing API changes, API doc string has been updated.
- For new C++ functions in header files, their functionalities and arguments are documented.
- For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
- Check the API doc at https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
- [ ] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
### Changes ###
- [ ] Feature1, tests, (and when applicable, API doc)
- [ ] Feature2, tests, (and when applicable, API doc)
## Comments ##
- If this change is a backward incompatible change, why must this change be made.
- Interesting edge cases to note here
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-mxnet] haojin2 commented on a change in pull request
#17619: [numpy] add op fabs, sometrue, round_
Posted by GitBox <gi...@apache.org>.
haojin2 commented on a change in pull request #17619: [numpy] add op fabs, sometrue, round_
URL: https://github.com/apache/incubator-mxnet/pull/17619#discussion_r380531805
##########
File path: src/operator/numpy/np_elemwise_unary_op_basic.cc
##########
@@ -133,6 +133,7 @@ Example::
// abs
MXNET_OPERATOR_REGISTER_NUMPY_UNARY(_npi_absolute, "x", mshadow_op::abs)
.add_alias("_npi_abs")
+.add_alias("_npi_fabs")
Review comment:
seems like you're only using `npi.abs` in your Python wrappers, then no need for this alias.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-mxnet] haojin2 commented on a change in pull request
#17619: [numpy] add op fabs, sometrue, round_
Posted by GitBox <gi...@apache.org>.
haojin2 commented on a change in pull request #17619: [numpy] add op fabs, sometrue, round_
URL: https://github.com/apache/incubator-mxnet/pull/17619#discussion_r381828084
##########
File path: python/mxnet/symbol/numpy/_symbol.py
##########
@@ -523,6 +523,14 @@ def abs(self, *args, **kwargs):
"""
raise AttributeError('_Symbol object has no attribute abs')
+ def fabs(self, *args, **kwargs):
Review comment:
no need for this convenient method either.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-mxnet] reminisce commented on a change in pull request
#17619: [numpy] add op fabs, sometrue, round_
Posted by GitBox <gi...@apache.org>.
reminisce commented on a change in pull request #17619: [numpy] add op fabs, sometrue, round_
URL: https://github.com/apache/incubator-mxnet/pull/17619#discussion_r382284397
##########
File path: python/mxnet/_numpy_op_doc.py
##########
@@ -121,6 +121,21 @@ def _np_any(a, axis=None, keepdims=False, out=None):
pass
+def _np_sometrue(a, axis=None, keepdims=False, out=None):
+ """
+ sometrue(*args, **kwargs)
Review comment:
No need to have this line.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-mxnet] haojin2 commented on a change in pull request
#17619: [numpy] add op fabs, sometrue, round_
Posted by GitBox <gi...@apache.org>.
haojin2 commented on a change in pull request #17619: [numpy] add op fabs, sometrue, round_
URL: https://github.com/apache/incubator-mxnet/pull/17619#discussion_r380530563
##########
File path: python/mxnet/ndarray/numpy/_op.py
##########
@@ -39,7 +39,7 @@
'average', 'mean', 'maximum', 'minimum',
'swapaxes', 'clip', 'argmax', 'argmin', 'std', 'var', 'indices', 'copysign', 'ravel', 'unravel_index',
'diag_indices_from', 'hanning', 'hamming', 'blackman', 'flip', 'flipud', 'fliplr', 'around', 'round',
- 'hypot', 'bitwise_and', 'bitwise_xor', 'bitwise_or', 'rad2deg', 'deg2rad', 'unique', 'lcm',
+ 'round_', 'hypot', 'bitwise_and', 'bitwise_xor', 'bitwise_or', 'rad2deg', 'deg2rad', 'unique', 'lcm',
Review comment:
maybe move this to the position after `around` and `round`, both in this list and in the file. Same for all other files as well.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-mxnet] haojin2 commented on a change in pull request
#17619: [numpy] add op fabs, sometrue, round_
Posted by GitBox <gi...@apache.org>.
haojin2 commented on a change in pull request #17619: [numpy] add op fabs, sometrue, round_
URL: https://github.com/apache/incubator-mxnet/pull/17619#discussion_r380530069
##########
File path: python/mxnet/_numpy_op_doc.py
##########
@@ -121,6 +121,22 @@ def _np_any(a, axis=None, keepdims=False, out=None):
pass
+
Review comment:
get rid of this blank line
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-mxnet] haojin2 commented on a change in pull request
#17619: [numpy] add op fabs, sometrue, round_
Posted by GitBox <gi...@apache.org>.
haojin2 commented on a change in pull request #17619: [numpy] add op fabs, sometrue, round_
URL: https://github.com/apache/incubator-mxnet/pull/17619#discussion_r380531347
##########
File path: python/mxnet/numpy/multiarray.py
##########
@@ -1572,6 +1572,14 @@ def clip(self, min=None, max=None, out=None): # pylint: disable=arguments-diffe
"""
return clip(self, min, max, out=out)
+ def fabs(self, *args, **kwargs):
Review comment:
no need for adding non-existent convenience method
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-mxnet] haojin2 merged pull request #17619: [numpy] add
op fabs, sometrue, round_
Posted by GitBox <gi...@apache.org>.
haojin2 merged pull request #17619: [numpy] add op fabs, sometrue, round_
URL: https://github.com/apache/incubator-mxnet/pull/17619
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services