szha commented on a change in pull request #18580:
URL: https://github.com/apache/incubator-mxnet/pull/18580#discussion_r442014947



##########
File path: python/mxnet/numpy/multiarray.py
##########
@@ -10136,6 +10142,12 @@ def may_share_memory(a, b, max_work=None):
     - Does not support `max_work`, it is a dummy argument
     - Actually it is same as `shares_memory` in MXNet DeepNumPy
     """
+    if isinstance(a, _np.ndarray):
+        a = _as_mx_np_array(a)
+    if isinstance(b, _np.ndarray):
+        b = _as_mx_np_array(b)
+    if a.ctx != b.ctx:
+        return False

Review comment:
       I'm doing the same in array function in 
https://github.com/apache/incubator-mxnet/pull/18562/files#diff-2867f3bd5e893c32c128044e32d821d6R361.
 Sorry that I should have linked to the issue earlier.




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


Reply via email to