Skip to content

Commit 6f3ee60

Browse files
committed
Fix mypy error expecting bool not np.bool
1 parent e2a82d2 commit 6f3ee60

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Python: Current File",
6+
"type": "debugpy",
7+
"request": "launch",
8+
"program": "${file}",
9+
"console": "integratedTerminal",
10+
"justMyCode": true,
11+
"env": {
12+
"PYTHONPATH": "${workspaceFolder}"
13+
}
14+
}
15+
]
16+
}

cf_xarray/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def _is_bounds_monotonic(bounds: np.ndarray) -> bool:
368368
if nonzero_diffs.size == 0:
369369
return True
370370

371-
return np.all(nonzero_diffs > 0) or np.all(nonzero_diffs < 0)
371+
return bool(np.all(nonzero_diffs > 0) or np.all(nonzero_diffs < 0))
372372

373373

374374
def _get_order_of_core_dims(core_dim_orders: dict[str, str]) -> str:

ci/environment-all-min-deps.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: cf_xarray_test
22
channels:
33
- conda-forge
44
dependencies:
5+
- python=3.11
56
- pytest-cov
67
- pytest
78
- pytest-xdist

0 commit comments

Comments
 (0)