Skip to content

Commit

Permalink
Check exception of old numpy versions
Browse files Browse the repository at this point in the history
I'm not able to install old numpy versions locally and the exception
documentation of numpy is non existent and I can't bother to go through
its source code, so I'll just see what the actions show.
  • Loading branch information
LSchueler committed Nov 20, 2024
1 parent 86ba913 commit 727f86d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/gstools/field/pgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,7 @@ def calc_pgs(self):
pgs : :class:`numpy.ndarray`
the plurigaussian field
"""
try:
mapping = np.stack(self._Zs, axis=1)
except np.exceptions.AxisError:
# if dim==1, `fields` is prob. a raw field & not a 1-tuple or
# equivalent
if self._dim == 1:
self._Zs = [self._Zs]
mapping = np.stack(self._Zs, axis=1)
else:
raise
mapping = np.stack(self._Zs, axis=1)
pos_l = []
for d in range(self._dim):
pos_l.append(
Expand Down

0 comments on commit 727f86d

Please sign in to comment.