sxjscience opened a new issue #18132:
URL: https://github.com/apache/incubator-mxnet/issues/18132
Minimal reproducible example:
```python
import mxnet as mx
mx.npx.set_np()
a = mx.np.ones((10, 10, 3))
mx.np.split(a, 3, axis=-1)
```
Error message
```
MXNetError Traceback (most recent call last)
<ipython-input-20-31fd4ac7e489> in <module>
----> 1 mx.np.split(a, 3, axis=-1)
~/mxnet/python/mxnet/numpy/multiarray.py in split(ary, indices_or_sections,
axis)
5835 [array([0., 1., 2.]), array([3., 4.]), array([5.]), array([6.,
7.]), array([])]
5836 """
-> 5837 return _mx_nd_np.split(ary, indices_or_sections, axis=axis)
5838
5839
~/mxnet/python/mxnet/ndarray/numpy/_op.py in split(ary, indices_or_sections,
axis)
3905 if isinstance(indices_or_sections, set):
3906 indices_or_sections = list(indices_or_sections)
-> 3907 return list(_api_internal.split(ary, indices_or_sections, axis))
3908 # pylint: enable=redefined-outer-name
3909
~/mxnet/python/mxnet/_ffi/_ctypes/function.py in __call__(self, *args)
113 self.handle, values, tcodes, ctypes.c_int(num_args),
114 ctypes.byref(ret_val), ctypes.byref(ret_tcode)) != 0:
--> 115 raise get_last_ffi_error()
116 _ = temp_args
117 _ = args
MXNetError: Traceback (most recent call last):
File "../include/mxnet/./tuple.h", line 245
MXNetError: Check failed: i >= 0 && i < ndim(): index = -1 must be in range
[0, 3)
```
Just use numpy won't have any error.
```
import numpy as np
a = np.ones((10, 10, 3))
np.split(a, 3, axis=-1)
```
----------------------------------------------------------------
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]