Skip to content

Commit

Permalink
Added a message if no valid value is left
Browse files Browse the repository at this point in the history
  • Loading branch information
a3eille committed Nov 27, 2024
1 parent 3f52cc0 commit a106100
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion titantuner/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,10 @@ def apply_test(self):
self.data['flagged_least1'][Is[I1]] = np.full(len(I1), True)
self.plot_config(plot_orange_if_possible=True, first_map=False)
self.set_root(self.p)
self.ui["mean"].value = "%.1f" % (np.nanmean(values_to_test_Is[I0]))
if len(I0):
self.ui["mean"].value = "%.1f" % (np.nanmean(values_to_test_Is[I0]))
else:
self.ui["mean"].value = "No valid value left"


# self.dh.data = {'y': yy_Is, 'x': xx_Is
Expand Down

0 comments on commit a106100

Please sign in to comment.