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 2019/02/05 12:27:15 UTC

[GitHub] jgasthaus commented on issue #14064: Inconsistent behavior in split() when num_outputs=1

jgasthaus commented on issue #14064: Inconsistent behavior in split() when num_outputs=1
URL: https://github.com/apache/incubator-mxnet/issues/14064#issuecomment-460619901
 
 
   @ChaiBapchya Sure, I can try to submit a doc-change PR. 
   
   I agree with @szha that this might be a good candidate for a breaking API change in 2.0. We have a few places in our code where we now have to branch because of this. It can also lead to fairly subtle bugs, especially since both lists and NDArrays support indexing, so you might not notice that you are indexing the returned array along the 0-th axis as opposed to the list as intended.
   
   Also note that this is not consistent with numpy's ```split()``` behavior:
   
   ````
   In[42]: type(np.split(np.ones((2, 1, 4, 5)), 1, axis=1))
   Out[42]: list
   In[42]: type(np.split(np.ones((2, 2, 4, 5)), 2, axis=1))
   Out[49]: list

----------------------------------------------------------------
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