FIX: Make array_view.size return 0 for empty arrays by jkseppan · Pull Request #5264 · matplotlib/matplotlib · GitHub
Skip to content

FIX: Make array_view.size return 0 for empty arrays - #5264

Closed
jkseppan wants to merge 1 commit into
matplotlib:masterfrom
jkseppan:array-view-size
Closed

jkseppan wants to merge 1 commit into
matplotlib:masterfrom
jkseppan:array-view-size

Conversation

@jkseppan

Copy link
Copy Markdown
Member

This is an API change that seems somewhat illogical to me, but it probably avoids errors like #5185 without fixes like #5241, which seems more puzzling to me. What I mean by illogical is that a sequence with a nonzero number of zero-sized elements is presented as having length 0. But making it consistent in that corner case is probably more puzzling to code using array_view than returning the actual number of empty elements.

@mdboom

mdboom commented Oct 19, 2015

Copy link
Copy Markdown
Member

@mdboom mdboom added this to the next point release (1.5.0) milestone Oct 19, 2015
@jkseppan

Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants