Skip to content

Commit

Permalink
remove unnecessary import
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhassell committed Feb 4, 2022
1 parent f627f21 commit a669221
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cf/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1816,8 +1816,6 @@ def digitize(
[ 1 1 1 --]]
"""
from dask.array import digitize

d = _inplace_enabled_define_and_cleanup(self)

org_units = d.Units
Expand Down Expand Up @@ -1845,8 +1843,8 @@ def digitize(

if bins.ndim > 2:
raise ValueError(
"The 'bins' parameter must be scalar, 1-d or 2-d"
f" Got: {bins!r}"
"The 'bins' parameter must be scalar, 1-d or 2-d. "
f"Got: {bins!r}"
)

two_d_bins = None
Expand Down Expand Up @@ -1940,7 +1938,7 @@ def digitize(

# Digitise the array
dx = d._get_dask()
dx = digitize(dx, bins, right=upper)
dx = da.digitize(dx, bins, right=upper)
d._set_dask(dx, reset_mask_hardness=True)
d.override_units(_units_None, inplace=True)

Expand Down

0 comments on commit a669221

Please sign in to comment.