nibabel.casting¶
Utilities for casting numpy values in various ways
Most routines work round some numpy oddities in floating point precision and casting. Others work round numpy casting to and from python ints
Functions
|
Find the smallest integer numpy type to contain sequence values |
|
Return python integer representation of number |
|
Floating point type with best precision |
|
Return nearest exact integer >= val in float type flt_type |
|
Convert floating point array arr to type int_type |
|
Return nearest exact integer <= val in float type flt_type |
|
floor of log2 of abs(x) |
|
True if we have a binary128 IEEE longdouble |
|
Absolute values of array taking care of max negative int values |
|
Convert integer val to floating point type flt_type |
|
Return True if longdouble appears to have the same precision as float64 |
|
True if longdouble precision increased since initial import |
|
Return floating point types sorted by precision |
|
True if we are running on a Power PC platform |
|
Min and max in float type that are >=min, <=max in integer type |
|
Return dict with min, max, nexp, nmant, width for numpy type np_type |
|
Return gap between val and nearest representable number of same type |
Exceptions
|
|
|