(
shapes: tuple[float | int, float | int],
)
| 1131 | ], |
| 1132 | ) |
| 1133 | def test_boolean_mask_with_unknown_shape( |
| 1134 | shapes: tuple[float | int, float | int], |
| 1135 | ) -> None: |
| 1136 | x_shape, mask_shape = shapes |
| 1137 | arr = delayed(np.ones(10)) |
| 1138 | x = da.concatenate( |
| 1139 | [ |
| 1140 | da.from_delayed(arr, shape=(x_shape,), dtype=float), |
| 1141 | da.from_delayed(arr, shape=(x_shape,), dtype=float), |
| 1142 | ] |
| 1143 | ) |
| 1144 | mask = da.concatenate( |
| 1145 | [ |
| 1146 | da.from_delayed(arr, shape=(mask_shape,), dtype=bool), |
| 1147 | da.from_delayed(arr, shape=(mask_shape,), dtype=bool), |
| 1148 | ] |
| 1149 | ) |
| 1150 | x[mask] = 2 |
| 1151 | |
| 1152 | expected = np.full(20, 2.0) |
| 1153 | assert_eq(x, expected) |
nothing calls this directly
no test coverage detected