Skip to content

Commit

Permalink
userDash | transform numpy float64 to usual float to avoid JS failures
Browse files Browse the repository at this point in the history
  • Loading branch information
tkorchug committed Nov 26, 2024
1 parent 4a105be commit 2632f15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/libs/exlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ def build_stack_histogram(data_raw, **kwargs):
for site, sd in data_raw.items():
data_all.extend(sd)

stats.append(np.average(data_all) if not np.isnan(np.average(data_all)) else 0)
stats.append(np.std(data_all) if not np.isnan(np.std(data_all)) else 0)
stats.append(round_to_n_digits(np.average(data_all), 3) if not np.isnan(np.average(data_all)) else 0)
stats.append(round_to_n_digits(np.std(data_all), 3) if not np.isnan(np.std(data_all)) else 0)

if stats[1] == 0:
n_bins = 1
Expand Down

0 comments on commit 2632f15

Please sign in to comment.