Repository navigation
BUG: fix array too big error for wide dtypes. - #7463
Merged
Merged
Conversation
Member
There was a problem hiding this comment.
Shouldn't this be shape=(max_bytes//itemsize + 1,)? I think that's the first size that will error...
Member
Author
There was a problem hiding this comment.
Hah, yes, I had that first and some other error (I think dtype was missing first), and then without thinking put that ;). Fixed.
The error was not being raised when arr.size * arr.dtype.itemsize was too large, but only when arr.size was too large alone. Closes numpygh-7451
| } | ||
|
|
||
| /* Check dimensions */ | ||
| size = sd; |
Member
Author
There was a problem hiding this comment.
Hmmm, could rename size to nbytes or so maybe if you like.
Member
There was a problem hiding this comment.
I'm OK with the name, I'm just amazed at how simply you have solved this: I took a look at this a couple of days ago and didn't find any clean way of fixing it.
Member
|
Thanks for bearing with my (justified, of course) paranoia. Will merge it as soon as Appveyor gives its OK. Thanks Sebastian! |
Member
|
And in it goes! |
This was referenced Mar 15, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The error was not being raised when arr.size * arr.dtype.itemsize
was too large, but only when arr.size was too large alone.
Closes gh-7451