We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3a7ce9 commit 726aed8Copy full SHA for 726aed8
src/postgkyl/data/gdata.py
@@ -189,7 +189,7 @@ def get_input_file(self) -> str:
189
190
# ---- Number of Cells ----
191
def get_num_cells(self) -> np.ndarray:
192
- if self.ctx.get("cells"):
+ if self.ctx.get("cells") is not None:
193
return self.ctx["cells"]
194
elif self._values is not None:
195
num_dims = len(self._values.shape) - 1
@@ -218,7 +218,7 @@ def get_num_comps(self) -> int:
218
219
# ---- Number of Dimensions -----
220
def get_num_dims(self, squeeze: bool = False) -> int:
221
222
num_dims = len(self.ctx["cells"])
223
224
num_dims = int(len(self._values.shape) - 1)
0 commit comments