nibabel.arraywriters¶
Array writer objects
Array writers have init signature:
def __init__(self, array, out_dtype=None)
and methods
scaling_needed() - returns True if array requires scaling for write
finite_range() - returns min, max of self.array
to_fileobj(fileobj, offset=None, order=’F’)
They must have attributes / properties of:
array
out_dtype
has_nan
They may have attributes:
slope
inter
They are designed to write arrays to a fileobj with reasonable memory efficiency.
Array writers may be able to scale the array or apply an intercept, or do something else to make sense of conversions between float and int, or between larger ints and smaller.
Functions
|
Return slope, intercept from array writer object |
|
Make array writer instance for array data and output type out_type |
Classes
|
Initialize array writer |
|
ArrayWriter that can use scalefactor for writing arrays |
|
Array writer that can use slope and intercept to scale array |
Exceptions
|
|
|