Skip to content

Commit

Permalink
#131 Fix inferred type of abs(DataArray)
Browse files Browse the repository at this point in the history
  • Loading branch information
astropenguin committed Nov 12, 2023
1 parent 8fc5cda commit 8a9a8c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions decode/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


# dependencies
from typing import Any, Optional
from typing import Any, Optional, cast
import numpy as np
import xarray as xr
from xarray.core.types import Dims
Expand Down Expand Up @@ -37,4 +37,4 @@ def median(da: xr.DataArray) -> xr.DataArray:
**kwargs,
)

return median(np.abs(da - median(da)))
return median(cast(xr.DataArray, np.abs(da - median(da))))

0 comments on commit 8a9a8c1

Please sign in to comment.