You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/01/21 08:01:00 UTC
[GitHub] [incubator-mxnet] Alicia1529 opened a new pull request #17391: fix
issue #17389: Indexing ndarray should give empty array output
Alicia1529 opened a new pull request #17391: fix issue #17389: Indexing ndarray should give empty array output
URL: https://github.com/apache/incubator-mxnet/pull/17391
This pr is to fix the indexing problem in issue #17389: Indexing ndarray should give empty array output
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-mxnet] reminisce merged pull request #17391: fix issue
#17389: Indexing ndarray should give empty array output
Posted by GitBox <gi...@apache.org>.
reminisce merged pull request #17391: fix issue #17389: Indexing ndarray should give empty array output
URL: https://github.com/apache/incubator-mxnet/pull/17391
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-mxnet] reminisce commented on a change in pull request
#17391: fix issue #17389: Indexing ndarray should give empty array output
Posted by GitBox <gi...@apache.org>.
reminisce commented on a change in pull request #17391: fix issue #17389: Indexing ndarray should give empty array output
URL: https://github.com/apache/incubator-mxnet/pull/17391#discussion_r369183135
##########
File path: python/mxnet/ndarray/ndarray.py
##########
@@ -3096,7 +3096,7 @@ def _get_index_range(start, stop, length, step=1):
start += length
if start < 0:
raise IndexError('Slicing start %d exceeds limit of %d' % (start-length, length))
- elif start >= length:
Review comment:
This is not sufficient for the fix. It should be also valid when `start > length`.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-mxnet] reminisce commented on a change in pull request
#17391: fix issue #17389: Indexing ndarray should give empty array output
Posted by GitBox <gi...@apache.org>.
reminisce commented on a change in pull request #17391: fix issue #17389: Indexing ndarray should give empty array output
URL: https://github.com/apache/incubator-mxnet/pull/17391#discussion_r375647542
##########
File path: python/mxnet/ndarray/ndarray.py
##########
@@ -3110,9 +3110,9 @@ def _get_index_range(start, stop, length, step=1):
elif stop < 0:
stop += length
if stop < 0:
- raise IndexError('Slicing stop %d exceeds limit of %d' % (stop-length, length))
+ stop = 0
Review comment:
Should `stop` be -1? Otherwise, a[0] will not be included in the sliced array.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services