fsl.utils.naninfrange
This module provides the naninfrange()
function, which calculates
the range of a numpy array, ignoring infinite and nan values.
- fsl.utils.naninfrange.naninfrange(data)[source]
Returns the minimum and maximum values in the given
numpy
array, ignoringnan
andinf
values.The
numpy.nanmin
/numpy.nanmax
functions do not handle positive/negative infinity, so if such values are in the data, we need to use an alternate approach to calculating the minimum/maximum.