From 7df95b91c0f65b7d3252cb1a73f005de26632c44 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Sun, 13 Aug 2023 15:03:22 +0200 Subject: [PATCH] declare `create_template` as callable --- xarray/core/variable.py | 1 + 1 file changed, 1 insertion(+) diff --git a/xarray/core/variable.py b/xarray/core/variable.py index e5c94ea53c8..c89545c43ae 100644 --- a/xarray/core/variable.py +++ b/xarray/core/variable.py @@ -1837,6 +1837,7 @@ def _unstack_once( new_shape = tuple(list(reordered.shape[: len(other_dims)]) + new_dim_sizes) new_dims = reordered.dims[: len(other_dims)] + new_dim_names + create_template: Callable if fill_value is dtypes.NA: is_missing_values = math.prod(new_shape) > math.prod(self.shape) if is_missing_values: