From 4da90603da20af2efd1529102b5d9b08c860b47e Mon Sep 17 00:00:00 2001 From: ndaelman Date: Fri, 17 May 2024 22:30:52 +0200 Subject: [PATCH] Fix mypy typing nameclash (gosh, mypy sucks) --- src/nomad_simulations/model_system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nomad_simulations/model_system.py b/src/nomad_simulations/model_system.py index a1acaed8..6426b332 100644 --- a/src/nomad_simulations/model_system.py +++ b/src/nomad_simulations/model_system.py @@ -453,8 +453,8 @@ def __init__( self.combo = combo self.type = type - counts, self.bins = np.histogram(distribution_values.magnitude, bins=bins) - self.bins *= distribution_values.u + counts, _bins = np.histogram(distribution_values.magnitude, bins=bins) + self.bins = _bins * distribution_values.u # normalize so the minimum is 1 if len(nonzero_counts := counts[np.where(counts > 0)]): self.frequency = counts / np.min(nonzero_counts)