@ljchang I've encountered a weird issue in both Brain_Data and Adjacency when I try to index with a boolean mask that contains a single True value. What I would expect is to get bad a 1d Brain_Data or a 1d Adjacency, e.g.
mask = [True, False, False] # I want back the first instance
brain = Brain_Data(...) # 3 images
out = brain[mask]
out.shape() # (1, numvox) but should be (numvox)
# Same thing happens with Adjacency
This is really annoying because it messes up how several methods behavior e.g. out.similarity(other_brain) throws a dimension mismatch error for both classes.
Maybe you need to add another type check in the __getitem__ to deal with this?
@ljchang I've encountered a weird issue in both
Brain_Data
andAdjacency
when I try to index with a boolean mask that contains a singleTrue
value. What I would expect is to get bad a 1dBrain_Data
or a 1dAdjacency
, e.g.This is really annoying because it messes up how several methods behavior e.g.
out.similarity(other_brain)
throws a dimension mismatch error for both classes.Maybe you need to add another type check in the
__getitem__
to deal with this?