We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68f489e commit bffeceaCopy full SHA for bffecea
nibabel/analyze.py
@@ -974,7 +974,7 @@ def update_header(self):
974
# We need to update the header if the data shape has changed. It's a
975
# bit difficult to change the data shape using the standard API, but
976
# maybe it happened
977
- if not self._data is None:
+ if not self._data is None and hdr.get_data_shape() != self._data.shape:
978
hdr.set_data_shape(self._data.shape)
979
# If the affine is not None, and it is different from the main affine in
980
# the header, update the heaader
0 commit comments