Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH, TEST: silence prints when testing -m full #20370

Closed
wants to merge 1 commit into from

Conversation

mattip
Copy link
Member

@mattip mattip commented Nov 14, 2021

Closes #20289

  • stop printing spurious values in an f2py test
  • when calling np.empty([200, 200, 0]), only allocate the minimum data required (a single element). Previously this would allocate 200 * 200 * 1 elements.

@seberg
Copy link
Member

seberg commented Nov 14, 2021

IIRC, there was some weird hesitance about doing this change? If the only hesitance was the "undefined behaviour" of working with pointers outside of the allocated range (but never de-referencing them), I am willing happy to give this a shot if everyone thinks that this in practice just should not matter.

@eric-wieser do you remember if it is important to avoid that "undefined behaviour"? I.e. in your PR here: gh-15788 you tried to ensure no "out-of-bound" pointer arithmetic is possible by overriding strides to 0?

@mattip
Copy link
Member Author

mattip commented Nov 15, 2021

Closing, I forgot about #15788 which is more complete

@mattip mattip closed this Nov 15, 2021
@mattip mattip deleted the test-print branch December 27, 2022 16:49
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.

BUG(?): Tests print 'uh-oh, unmatched shift_free(ptr, 8) but allocated 720'
2 participants