Skip to content

Commit

Permalink
enh: better handling of inf values
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Nov 9, 2023
1 parent 4eefc29 commit 232d51e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nanite/rate/rater.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def load_training_set(cls, path=None, names=None, which_type=None,
response = np.loadtxt(resp_path, dtype=float)
if remove_nan:
# Remove nan-values from training set
valid = ~np.isnan(np.sum(samples, axis=1))
valid = ~np.array(np.sum(np.isnan(samples), axis=1), dtype=bool)
samples = samples[valid, :]
# remove corresponding responses
response = response[valid]
Expand Down

0 comments on commit 232d51e

Please sign in to comment.