We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 781f3fe commit 61ab885Copy full SHA for 61ab885
1 file changed
python-flatten-list/flatten_numpy_flatten.py
@@ -1,6 +1,11 @@
1
import numpy as np
2
3
-matrix = [list(range(100))] * 4
4
-arr = np.array(matrix)
+matrix = np.array(
+[
5
+ [9, 3, 8, 3],
6
+ [4, 5, 2, 8],
7
+ [6, 4, 3, 1],
8
+ [1, 0, 4, 5],
9
+])
10
11
matrix.flatten()
0 commit comments