diff --git a/100_Numpy_exercises_with_solutions.md b/100_Numpy_exercises_with_solutions.md index 010a18ce..1b99299f 100644 --- a/100_Numpy_exercises_with_solutions.md +++ b/100_Numpy_exercises_with_solutions.md @@ -188,9 +188,10 @@ print(Z) ```python -Z = np.random.random((5,5)) -Z = (Z - np.mean (Z)) / (np.std (Z)) -print(Z) +x = np.random.random((5,5)) +xmax, xmin = x.max(), x.min() +x = (x - xmin)/(xmax - xmin) +print(x) ``` #### 23. Create a custom dtype that describes a color as four unsigned bytes (RGBA) (★☆☆) @@ -1243,4 +1244,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) -``` \ No newline at end of file +```