(arrays, axis=0)
| 41 | |
| 42 | @concatenate_lookup.register(np.ma.masked_array) |
| 43 | def _concatenate(arrays, axis=0): |
| 44 | out = np.ma.concatenate(arrays, axis=axis) |
| 45 | fill_values = [i.fill_value for i in arrays if hasattr(i, "fill_value")] |
| 46 | if any(isinstance(f, np.ndarray) for f in fill_values): |
| 47 | raise ValueError( |
| 48 | "Dask doesn't support masked array's with non-scalar `fill_value`s" |
| 49 | ) |
| 50 | if fill_values: |
| 51 | # If all the fill_values are the same copy over the fill value |
| 52 | fill_values = np.unique(fill_values) |
| 53 | if len(fill_values) == 1: |
| 54 | out.fill_value = fill_values[0] |
| 55 | return out |
| 56 | |
| 57 | |
| 58 | @tensordot_lookup.register(np.ma.masked_array) |
no test coverage detected
searching dependent graphs…