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 4ba6a73 commit 583e0aaCopy full SHA for 583e0aa
nibabel/metasum.py
@@ -165,7 +165,15 @@ def get_value(self, idx):
165
166
def to_list(self):
167
'''Convert back to a list of values'''
168
- return [self.get_value(i) for i in range(self.n_input)]
+ if self._const_val is not _NoValue:
169
+ return [self._const_val] * self._n_input
170
+ res = [_NoValue] * self._n_input
171
+ for val, idx in self._unique_vals.items():
172
+ res[idx] = val
173
+ for val, ba in self._val_bitarrs.items():
174
+ for idx in self._extract_indices(ba):
175
176
+ return res
177
178
def extend(self, values):
179
'''Add more values to the end of any existing ones'''
0 commit comments