When fetching from a sparse map without arguments, the expected behavior would be that siibra informs that a region or index needs to be specified. The current version however fails:
pmaps = siibra.parcellations.get('julich').get_map(space='mni152', maptype='statistical')
pmaps.fetch()
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
File ~/venvs/siibra-prod/lib/python3.11/site-packages/siibra/volumes/sparsemap.py:416, in SparseMap.fetch(self, region_or_index, index, region, **kwargs)
415 try:
--> 416 assert len(self) == 1
417 volidx = 0
AssertionError:
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
Cell In[63], line 1
----> 1 pmaps.fetch()
File ~/venvs/siibra-prod/lib/python3.11/site-packages/siibra/volumes/sparsemap.py:419, in SparseMap.fetch(self, region_or_index, index, region, **kwargs)
417 volidx = 0
418 except AssertionError:
--> 419 raise parcellationmap.InsufficientArgumentException(
420 f"{self.__class__.__name__} provides {len(self)} volumes. "
421 "Specify 'region' or 'index' for fetch() to identify one."
422 )
424 assert isinstance(volidx, int)
425 x, y, z, v = self.sparse_index.mapped_voxels(volidx)
AttributeError: module 'siibra.volumes.parcellationmap' has no attribute 'InsufficientArgumentException'
siibra version: 1.0a11
When fetching from a sparse map without arguments, the expected behavior would be that siibra informs that a region or index needs to be specified. The current version however fails: