Skip to content

Commit

Permalink
fix(CellField): remove extra imports
Browse files Browse the repository at this point in the history
  • Loading branch information
swapneelap committed Nov 30, 2023
1 parent bbcf435 commit 72d21c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions discretisedfield/cell_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import discretisedfield as df
import discretisedfield.plotting as dfp
from discretisedfield.plotting.utils import hv_key_dim

from .field import Field

Expand All @@ -29,12 +28,12 @@ def _hv_key_dims(self):
"""
key_dims = {
dim: hv_key_dim(coords, unit)
dim: dfp.util.hv_key_dim(coords, unit)
for dim, unit in zip(self.mesh.region.dims, self.mesh.region.units)
if len(coords := getattr(self.mesh.cells, dim)) > 1
}
if self.nvdim > 1:
key_dims["vdims"] = hv_key_dim(self.vdims, "")
key_dims["vdims"] = dfp.util.hv_key_dim(self.vdims, "")
return key_dims

def line(self, p1, p2, n=100):
Expand Down

0 comments on commit 72d21c8

Please sign in to comment.