Skip to content

BUG/MAINT: Non-native byteorder in random ints #13655

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

Merged
merged 1 commit into from
May 29, 2019

Conversation

bashtage
Copy link
Contributor

Warn that non-native byte order is not supported in randint and integers

closes #13159

@bashtage
Copy link
Contributor Author

Warns on RandomState, raises in Generator

@bashtage bashtage changed the title ENH: Warn about non-native byte order BUG/MAINT: Warn about non-native byte order in random integer generation May 28, 2019
@bashtage bashtage changed the title BUG/MAINT: Warn about non-native byte order in random integer generation BUG/MAINT: Warn about non-native byteorder in random ints May 28, 2019
@bashtage bashtage changed the title BUG/MAINT: Warn about non-native byteorder in random ints BUG/MAINT: Non-native byteorder in random ints May 28, 2019
@bashtage bashtage force-pushed the integer-byteorder branch from dce88f4 to 88e05c8 Compare May 28, 2019 17:46
@seberg seberg self-requested a review May 28, 2019 19:22
Copy link
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good modulo a few small things.

if key not in _integers_types:
raise TypeError('Unsupported dtype "%s" for randint' % key)
if dt.byteorder != '=' and dt.byteorder != '|':
import warnings
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine to go to the top level. Can you add # numpy 1.17.0, 2019-05-28 or similar as a comment to the deprecation.

Warn that non-native byte order is not supported in randint and integers

closes numpy#13159
@bashtage bashtage force-pushed the integer-byteorder branch from 88e05c8 to fbd9c51 Compare May 28, 2019 22:54
@bashtage
Copy link
Contributor Author

I believe I have fixed them all.

@seberg seberg self-requested a review May 28, 2019 23:13
@seberg
Copy link
Member

seberg commented May 29, 2019

Thanks Kevin!

@seberg seberg merged commit 7603e51 into numpy:master May 29, 2019
@bashtage bashtage deleted the integer-byteorder branch May 12, 2020 21:38
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.

np.random.randint no longer supports non-native byteorder
2 participants