reminisce commented on a change in pull request #16664: Miscellaneous fix for 
several numpy issues
URL: https://github.com/apache/incubator-mxnet/pull/16664#discussion_r340230096
 
 

 ##########
 File path: python/mxnet/numpy/multiarray.py
 ##########
 @@ -1993,10 +1993,12 @@ def array(object, dtype=None, ctx=None):
     """
     if ctx is None:
         ctx = current_context()
-    if isinstance(object, ndarray):
+    if isinstance(object, (ndarray, _np.ndarray)):
         dtype = object.dtype if dtype is None else dtype
     else:
 
 Review comment:
   Can we add one more check here for `isinstance(object, mx.nd.NDArray)` and 
error out that it's not allowed and users should call `as_np_ndarray` to do the 
zero-copy conversion?

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