TST: Add tests for PyArray_IntpConverter#16454
Merged
seberg merged 2 commits intonumpy:masterfrom May 31, 2020
Merged
Conversation
56c9a5f to
d7bba2a
Compare
Member
Tests fail because of too many warnings. |
eric-wieser
commented
May 31, 2020
seberg
approved these changes
May 31, 2020
Member
seberg
left a comment
There was a problem hiding this comment.
Beautiful, thanks Eric, does this basically mean we can merge the other PR next/soon? Putting this in.
| } | ||
|
|
||
| PyObject *tup = PyArray_IntTupleFromIntp(dims.len, dims.ptr); | ||
| PyDimMem_FREE(dims.ptr); |
Member
There was a problem hiding this comment.
Just in case for your (or anyone else's) info, we also have a npy_free_cache_dims_obj() which puts the dims back into a cache. But I like this here, since its public API and documented like this anway.
Member
Author
There was a problem hiding this comment.
I tried that, but this is compiled as a separate module so isn't available
| self.conv(2**64) | ||
|
|
||
| def test_too_many_dims(self): | ||
| assert self.conv([1]*32) == (1,)*32 |
Member
There was a problem hiding this comment.
I just noticed we actually expose np.MAXDIMS, no matter though, modifying the test is trivial, and I am not sure I like that we expose it...
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.
Split from gh-15886.