Numpy add numpy op hanning, hamming, blackman#15815
Conversation
9ecd328 to
14fc78f
Compare
6cd146e to
bea9be8
Compare
comaniac
left a comment
There was a problem hiding this comment.
Please rebase to the master and solve conflicts after resolving comments.
python/mxnet/ndarray/numpy/_op.py
Outdated
|
|
||
|
|
||
| @set_module('mxnet.ndarray.numpy') | ||
| def hanning(M, dtype=_np.float64, ctx=None): |
python/mxnet/ndarray/numpy/_op.py
Outdated
|
|
||
|
|
||
| @set_module('mxnet.ndarray.numpy') | ||
| def hanning(M, dtype=None, ctx=None): |
There was a problem hiding this comment.
I still prefer to use float64 as the default type in the function argument instead of having a checker at the beginning of the function. The reason is that the type of dtype would be Union[None, str, numpy.dtype] in the current implementation, which is inconsistent with the docstring saying that dtype : str or numpy.dtype. Also, it makes the semantic ambiguous and should be avoided especially in Python 3.7. If the default value of dtype in the argument is np.float64 or 'float64' then we can enforce its type to be Union[str, numpy.dtype] as documented.
There was a problem hiding this comment.
it's good, i think i should use float32 as the defaulet type,
c1ac152 to
d5754e4
Compare
comaniac
left a comment
There was a problem hiding this comment.
LGTM. I don't have further comments.
address test file fix test file make default dtype is float32
address test file fix test file make default dtype is float32
address test file fix test file make default dtype is float32
Description
(Brief description on what this PR is about)
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments