Skip to content

Commit

Permalink
Refine rolling_exp error messages (#8485)
Browse files Browse the repository at this point in the history
(Sorry, copy & pasted too liberally!)
  • Loading branch information
max-sixty authored Nov 25, 2023
1 parent a683790 commit 633e66a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xarray/core/rolling_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def var(self) -> T_DataWithCoords:
"""
if pycompat.mod_version("numbagg") < Version("0.4.0"):
raise ImportError(
f"numbagg >= 0.4.0 is required for rolling_exp().std(), currently {pycompat.mod_version('numbagg')} is installed"
f"numbagg >= 0.4.0 is required for rolling_exp().var(), currently {pycompat.mod_version('numbagg')} is installed"
)
dim_order = self.obj.dims
import numbagg
Expand Down Expand Up @@ -260,7 +260,7 @@ def cov(self, other: T_DataWithCoords) -> T_DataWithCoords:

if pycompat.mod_version("numbagg") < Version("0.4.0"):
raise ImportError(
f"numbagg >= 0.4.0 is required for rolling_exp().std(), currently {pycompat.mod_version('numbagg')} is installed"
f"numbagg >= 0.4.0 is required for rolling_exp().cov(), currently {pycompat.mod_version('numbagg')} is installed"
)
dim_order = self.obj.dims
import numbagg
Expand Down Expand Up @@ -294,7 +294,7 @@ def corr(self, other: T_DataWithCoords) -> T_DataWithCoords:

if pycompat.mod_version("numbagg") < Version("0.4.0"):
raise ImportError(
f"numbagg >= 0.4.0 is required for rolling_exp().std(), currently {pycompat.mod_version('numbagg')} is installed"
f"numbagg >= 0.4.0 is required for rolling_exp().corr(), currently {pycompat.mod_version('numbagg')} is installed"
)
dim_order = self.obj.dims
import numbagg
Expand Down

0 comments on commit 633e66a

Please sign in to comment.