From 89b5b43d1f00a087527ca267b32ea7bdb8579aa5 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sun, 18 Mar 2018 18:00:18 +0000 Subject: [PATCH] fix type error --- optics/light.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optics/light.py b/optics/light.py index 6d59547..515ed57 100644 --- a/optics/light.py +++ b/optics/light.py @@ -129,7 +129,7 @@ x = np.linspace(ds.min-1e-3, ds.max+1e-3, 300) gauss = mlab.normpdf(x, ds.mean, ds.std) # χ² test -O, B, _ = plt.hist(ds, bins=6, normed=1, facecolor='#506d72') +O, B, _ = plt.hist(np.asarray(ds), bins=6, normed=1, facecolor='#506d72') alpha = chi_squared(ds, O, B) print(''' # Δs histogram