Skip to content
Snippets Groups Projects

Multi xas with nans

Merged Wout De Nolf requested to merge multi_xas_with_nans into main
All threads resolved!
1 file
+ 2
4
Compare changes
  • Side-by-side
  • Inline
@@ -24,9 +24,7 @@ def array_undo_mask(masked: numpy.ndarray, mask: numpy.ndarray) -> numpy.ndarray
if not mask.any():
return masked
if numpy.issubdtype(masked.dtype, int):
fill_value = 0
else:
fill_value = numpy.nan
result = numpy.full(mask.shape, fill_value, dtype=masked.dtype)
raise TypeError("Integers are not supported")
result = numpy.full(mask.shape, numpy.nan, dtype=masked.dtype)
result[mask] = masked
return result
Loading