Skip to content

Floating point casting machinery #70

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 6 commits into from
Nov 12, 2011

Conversation

matthew-brett
Copy link
Member

Routines for robust casting of floating point to integer, checking for overflow.

I'm planning to use these in the array_to_file saving of floating point arrays to images.

I was previously testing the values before casting, but we're really
interested in the results after casting.  longdouble test now also works
at least on this Intel system.
Trying to avoid import-time use of np.finfo because of warnings in the
code that this will increase import time.
Flag to force integer values to maximum and minimum of the integer
dtype.
Scalar nan gave an error for fancy indexing.
floating, casting into one file.
When testing for int_clippers and casting, allow for possibility that
the overflow generates the integer maximum / minimum rather than a very
negative value (in the max overflow case)
@matthew-brett
Copy link
Member Author

Any comments here?

@matthew-brett
Copy link
Member Author

Will merge tomorrow unless I hear otherwise

matthew-brett added a commit that referenced this pull request Nov 12, 2011
Floating point casting machinery

Routines for robust casting of floating point to integer, checking for overflow.
@matthew-brett matthew-brett merged commit 04ef466 into nipy:master Nov 12, 2011
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.

1 participant