reminisce commented on a change in pull request #15418: [numpy] fix cython
URL: https://github.com/apache/incubator-mxnet/pull/15418#discussion_r299237059
##########
File path: python/mxnet/cython/ndarray.pyx
##########
@@ -64,21 +64,29 @@ cdef class NDArrayBase:
_ndarray_cls = None
+_np_ndarray_cls = None
def _set_ndarray_class(cls):
global _ndarray_cls
_ndarray_cls = cls
-cdef NewArray(NDArrayHandle handle, int stype=-1):
+def _set_np_ndarray_class(cls):
+ global _np_ndarray_cls
+ _np_ndarray_cls = cls
+
+
+cdef NewArray(NDArrayHandle handle, int is_np_op, int stype=-1):
Review comment:
1. Rename `is_np_op` to `is_np_array` for better readability.
2. Better not to change the original API. You can switch `is_np_array` with
`stype` and default `is_np_array` to 0.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services