Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/nanquantiles' into nanquantiles
Browse files Browse the repository at this point in the history
  • Loading branch information
maawoo committed Jan 31, 2024
2 parents f424366 + 9ee24ec commit b753f0a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions xarray/core/variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
ensure_us_time_resolution,
is_duck_array,
maybe_coerce_to_str,
module_available
module_available,
)
from xarray.namedarray.core import NamedArray, _raise_if_any_duplicate_dimensions
from xarray.namedarray.utils import infix_dims
Expand Down Expand Up @@ -1996,9 +1996,13 @@ def quantile(

using_numbagg = False
if skipna or (skipna is None and self.dtype.kind in "cfO"):
if (module_available("numbagg") and OPTIONS["use_numbagg"] is True and
method == "linear"):
if (
module_available("numbagg")
and OPTIONS["use_numbagg"] is True
and method == "linear"
):
import numbagg

_quantile_func = numbagg.nanquantile
using_numbagg = True
else:
Expand Down

0 comments on commit b753f0a

Please sign in to comment.