DeaglanBartlett / ESR

21 stars 6 forks source link

Using np.where to apply the mask #1

Closed gAldeia closed 1 year ago

gAldeia commented 1 year ago

The m array should be filled with explicit boolean values to be used directly as it is. If m is filled with zeros and ones (as integer values), it seems that msk[m] treats m as a list of indexes in some cases. For example, when calling get_allowed_shapes(3), the topology [1, 1, 0] --- which is indeed an allowed shape --- is wrongly discarded due to m being interpreted as an list of indexes.