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

 ##########
 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):
+            for key, value in kwargs.items():
 
 Review comment:
   it also helps throw exception with the invalid argument name, which is 
consistent with numpy's behavior.

----------------------------------------------------------------
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