Skip to content

Commit

Permalink
BF: Explicitly cast to simple float from numpy.float32 which is now r…
Browse files Browse the repository at this point in the history
…eturned by smth (nibabel?)
  • Loading branch information
yarikoptic committed Dec 9, 2024
1 parent 5c50cb9 commit 26217a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datalad_neuroimaging/extractors/nifti1.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def get_metadata(self, dataset, content):
spatial_unit))
# TODO does not see the light of day
meta['spatial_resolution(mm)'] = \
[(i * spatial_unit_conversion) for i in header.get_zooms()[:3]]
[(float(i * spatial_unit_conversion)) for i in header.get_zooms()[:3]]
# time
if len(header.get_zooms()) > 3:
# got a 4th dimension
Expand All @@ -194,7 +194,7 @@ def get_metadata(self, dataset, content):
'micron': 0.000001}.get(rts_unit, 1.0)
if rts_unit not in ('hz', 'ppm', 'rads'):
meta['temporal_spacing(s)'] = \
header.get_zooms()[3] * rts_unit_conversion
float(header.get_zooms()[3] * rts_unit_conversion)

contentmeta.append((f, meta))

Expand Down

0 comments on commit 26217a3

Please sign in to comment.