Closed joe-pitt closed 3 months ago
I am using numpy v1.26.4 in case that is relevant here.
Changing get_instrument_type to this works:
# If instrument_numbers is a list, return a list of strings
if isinstance(instrument_numbers, list):
instrument_type = [k for k, v in instrument_number.items() if v in instrument_numbers]
else:
instrument_type = [k for k, v in instrument_number.items() if v == instrument_numbers][0]
return instrument_type
But then we lose the test, so it might not be ideal
Fixed in #81
In definitions.py the functions get_instrument_type() and get_instrument_number() check for an integer using:
isinstance(instrument_numbers, int)
This returns false for np.int8, which is what is you get from:instrument_numbers = list(np.unique(ds_combined.instrument_type.values))[0]
in the combination code in io.pyNeed to work out another comparison... This is separate to issue #77