Skip to content

Commit 48f3efe

Browse files
committed
fix early matplotlib import
1 parent f024bde commit 48f3efe

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/sdf_xarray/dataarray_accessor.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
from __future__ import annotations
2+
13
from types import MethodType
4+
from typing import TYPE_CHECKING
25

36
import xarray as xr
4-
from matplotlib.animation import FuncAnimation
57
from xarray.plot.accessor import DataArrayPlotAccessor
68

79
from .plotting import animate, show
810

11+
if TYPE_CHECKING:
12+
from matplotlib.animation import FuncAnimation
13+
914

1015
@xr.register_dataarray_accessor("epoch")
1116
class EpochAccessor:

0 commit comments

Comments
 (0)