File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,6 @@ mpl-use-full-test-name = true
110110
111111[tool .mypy ]
112112python_version = " 3.11"
113- plugins = [" numpy.typing.mypy_plugin" ]
114113
115114disallow_untyped_defs = true
116115warn_return_any = true
Original file line number Diff line number Diff line change @@ -1262,7 +1262,10 @@ def integer_indexes(data_array: xarray.DataArray) -> numpy.ndarray:
12621262 del topology_variables
12631263
12641264 logger .debug ("Slicing data variables..." )
1265- dimension_masks : dict [Hashable , numpy .ndarray ] = {
1265+ dimension_masks : dict [Hashable , numpy .ndarray [
1266+ tuple [Any , ...],
1267+ numpy .dtype [numpy .bool [bool ]],
1268+ ] | numpy .bool [bool ]] = {
12661269 topology .node_dimension : ~ numpy .ma .getmask (new_node_indexes ),
12671270 topology .face_dimension : ~ numpy .ma .getmask (new_face_indexes ),
12681271 }
@@ -1294,7 +1297,7 @@ def integer_indexes(data_array: xarray.DataArray) -> numpy.ndarray:
12941297 if dim in dimension_masks :
12951298 # ... make a tuple slice like (:, :, :, bool_array)
12961299 # where bool_array indicates which rows to include
1297- slice_index = tuple ([numpy .s_ [:]] * index + [dimension_masks [dim ]]) # type: ignore
1300+ slice_index = tuple ([numpy .s_ [:]] * index + [dimension_masks [dim ]])
12981301 values = values [slice_index ]
12991302
13001303 data_array = xarray .DataArray (data = values , dims = data_array .dims , name = name )
You can’t perform that action at this time.
0 commit comments