Skip to content

Expanded warning conditions for array_split#5771

Closed
MichaelCurrie wants to merge 1 commit intonumpy:masterfrom
MichaelCurrie:master
Closed

Expanded warning conditions for array_split#5771
MichaelCurrie wants to merge 1 commit intonumpy:masterfrom
MichaelCurrie:master

Conversation

@MichaelCurrie
Copy link

Zero-sized arrays can also occur with any of the partitions sub_arys[i]
induced by array_split, not just the final partition sub_arys[-1].

Zero arrays can also occur with any of the partitions sub_arys[i]
induced by array_split, not just the final partition sub_arys[-1].
@seberg
Copy link
Member

seberg commented Apr 17, 2015

Oh, right, when indices are passed in, I guess. Can you maybe make a test as well? That could be usefull also to convert the test in the future. Could keep the section_sizes array around also to check for this I suppose, instead of looping over all arrays. Not sure why I did not think of that back then....

Anyway, looks good to me, mostly would like the extra test.

@seberg seberg closed this in efd18a5 Sep 27, 2015
charris pushed a commit to charris/numpy that referenced this pull request Sep 27, 2015
Zero arrays can also occur with any of the partitions sub_arys[i]
induced by array_split, not just the final partition sub_arys[-1].

Modified by seberg.
Closes numpygh-5771
@homu
Copy link
Contributor

homu commented Sep 27, 2015

☔ The latest upstream changes (presumably #6371) made this pull request unmergeable. Please resolve the merge conflicts.

jaimefrio pushed a commit to jaimefrio/numpy that referenced this pull request Mar 22, 2016
Zero arrays can also occur with any of the partitions sub_arys[i]
induced by array_split, not just the final partition sub_arys[-1].

Modified by seberg.
Closes numpygh-5771
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants