File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,7 +112,8 @@ def __shape_setup__(cls, **kwargs):
112112 loc_shape = []
113113 assert len (dimensions ) == len (shape )
114114 for i , (d , s ) in enumerate (zip (dimensions , shape )):
115- if i == cls ._sparse_position :
115+ if i == cls ._sparse_position or \
116+ (cls ._sparse_position == - 1 and i == len (dimensions )- 1 ):
116117 loc_shape .append (glb_npoint [grid .distributor .myrank ])
117118 elif d in grid .dimensions :
118119 loc_shape .append (grid .size_map [d ].loc )
@@ -741,7 +742,7 @@ def time_dim(self):
741742
742743 @classmethod
743744 def __shape_setup__ (cls , ** kwargs ):
744- shape = list (AbstractSparseFunction .__shape_setup__ (** kwargs ))
745+ shape = list (super () .__shape_setup__ (** kwargs ))
745746 dimensions = as_tuple (kwargs .get ('dimensions' ))
746747 if dimensions is None or len (shape ) == len (dimensions ):
747748 # Shape has already been setup, for example via rebuild
You can’t perform that action at this time.
0 commit comments