Merge pull request #142 from artfintl/master

Fix solution of #66
This commit is contained in:
Nicolas P. Rougier
2021-02-18 12:43:51 +01:00
committed by GitHub

View File

@@ -682,7 +682,8 @@ print(F)
w,h = 16,16
I = np.random.randint(0,2,(h,w,3)).astype(np.ubyte)
F = I[...,0]*256*256 + I[...,1]*256 +I[...,2]
# The parenthesis around 256*256 ensure the dtpye promoted to uint32 properly.Otherwise the first term will overflow.
F = I[...,0]*(256*256) + I[...,1]*256 +I[...,2]
n = len(np.unique(F))
print(np.unique(I))
```
@@ -1179,4 +1180,4 @@ idx = np.random.randint(0, X.size, (N, X.size))
means = X[idx].mean(axis=1)
confint = np.percentile(means, [2.5, 97.5])
print(confint)
```
```