reminisce commented on a change in pull request #14745: fix min max on 
zero-sized ndarray
URL: https://github.com/apache/incubator-mxnet/pull/14745#discussion_r277106346
 
 

 ##########
 File path: tests/python/unittest/test_operator.py
 ##########
 @@ -6990,6 +6990,20 @@ def test_float16_min_max():
     assert np.finfo('float16').max == mx.nd.max(a).asscalar()
 
 
+@with_seed()
+def test_zero_sized_min_max():
+    def min():
+        a = mx.nd.zeros(shape=(5, 0))
 
 Review comment:
   It should have already failed here in the infer-shape function of `zeros`. 
If you want to use 0 as zero dim size, please turn numpy compatibility by 
adding a decorator to the test function so that it will fail in 
`ReduceMinMaxAxesShape` when `a.min()` is called.
   
   ```python
   @with_seed()
   @use_np_compat
   def test_zero_size_min_max():
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to