Skip to content

Commit

Permalink
BUG: Fix loading scalars from npz file
Browse files Browse the repository at this point in the history
  • Loading branch information
scottclowe committed Jul 10, 2021
1 parent 4441bcd commit 65709ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fissa/core.py
Expand Up @@ -685,9 +685,9 @@ def load(self, path=None):
value = cache[field]
if np.array_equal(value, None):
value = None
elif value.size == 1 and str(value) == value:
# Handle loading string parameters
value = str(value)
elif value.ndim == 0:
# Handle loading scalars
value = value.item()
setattr(self, field, value)

def separation_prep(self, redo=False):
Expand Down

0 comments on commit 65709ea

Please sign in to comment.