Skip to content

Commit 2b81a8e

Browse files
authored
Merge pull request #233 from KnightSnape/master
Use default_rng() instead of np.random.random in Exercise #12
2 parents 6b8d5bc + 1060e67 commit 2b81a8e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

100_Numpy_exercises_with_hints_with_solutions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ print(Z)
9696
Z = np.random.random((3,3,3))
9797
print(Z)
9898
```
99+
`hint: np.random.default_rng().random`
100+
```python
101+
# Author: KnightSnape
102+
103+
rng = np.random.default_rng()
104+
Z = rng.random((3, 3, 3))
105+
print(Z)
106+
```
107+
99108
#### 13. Create a 10x10 array with random values and find the minimum and maximum values (★☆☆)
100109
`hint: min, max`
101110

0 commit comments

Comments
 (0)