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 2017/12/19 09:08:59 UTC

[GitHub] safrooze commented on issue #9130: Inconsistent behavior of NDArray Indexing

safrooze commented on issue #9130: Inconsistent behavior of NDArray Indexing
URL: https://github.com/apache/incubator-mxnet/issues/9130#issuecomment-352682508
 
 
   That's exactly what I thought is happening. Although keeping efficiency in mind is always great, I see two problems:
   1. There is a bug in detecting whether the result of slice is contiguous or not, as evident in my example. There is no difference between indexing [0:1] and indexing [0:1, :]. The code assumes if you pass in the second dimension it won't be continuous, which is wrong.
   2. Even with proper documentation and correct contiguous buffer detection, the behavior is too obscure. As a user you don't know what you'll get! Is it a copy or should I creat a copy to make sure I'm not modifying the original array? This can make the overall  code even less efficient. Most people may be surprised with the copy implementation as the name and API both imply Numpy behavior. 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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