piiswrong commented on a change in pull request #9790: make array.reshape 
compatible with numpy
URL: https://github.com/apache/incubator-mxnet/pull/9790#discussion_r168293562
 
 

 ##########
 File path: python/mxnet/ndarray/ndarray.py
 ##########
 @@ -968,6 +973,14 @@ def reshape(self, shape):
         array([[-1., -1., -1.],
                [-1., -1., -1.]], dtype=float32)
         """
+        if len(shape) == 1 and isinstance(shape[0], (list, tuple)):
+            shape = shape[0]
+        elif not len(shape):
 
 Review comment:
   what happens for reshape(1, 2, shape=1)?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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