reminisce commented on a change in pull request #16621: [Numpy] Basic indexing
in symbolic interface of DeepNumpy
URL: https://github.com/apache/incubator-mxnet/pull/16621#discussion_r350468294
##########
File path: python/mxnet/ndarray/numpy/_op.py
##########
@@ -2774,10 +2773,10 @@ def split(ary, indices_or_sections, axis=0):
elif isinstance(indices_or_sections, (list, set, tuple)):
indices = [0] + list(indices_or_sections)
else:
- raise ValueError('indices_or_sections must either int, or tuple / list
/ set of ints')
+ raise ValueError('indices_or_sections must be either int, or tuple /
list / set of ints')
ret = _npi.split(ary, indices, axis, False)
- if not isinstance(ret, list):
- return [ret]
+ assert isinstance(ret, list), 'Output of split should be list,' \
+ ' get a return type {}'.format(type(ret))
Review comment:
nit: `get` -> `got`.
----------------------------------------------------------------
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