nibabel.volumeutils.pretty_mapping
nibabel.volumeutils.scale_min_max
Enter search terms or a module, class or function name.
Convert recarray to dictionary
Also converts scalar values to scalars
rec : ndarray
structured ndarray
dct : dict
dict with key, value pairs as for rec
Examples
>>> r = np.zeros((), dtype = [('x', 'i4'), ('s', 'S10')]) >>> d = rec2dict(r) >>> d == {'x': 0, 's': ''} True