Closed javierggt closed 5 months ago
I think something like this will work?
# Masked array col access ~100 times slower than ndarray so convert
dat_new = np.empty(dat.shape, dtype=dat.dtype)
for name in dat.dtype.names:
# Fill uint8 or int8 with 127 and others with -9999. All columns are numeric.
dat_new[name] = dat[name].filled(127 if dat[name].itemsize == 1 else -9999)
dat = dat_new
The following code:
Produces this warning
The exact point where this happens is https://github.com/sot/mica/blob/4.35.0/mica/archive/aca_l0.py#L237:
where data is an arbitrary array, but in the specific call that causes the warning during testing the type is