python list of numpy arrays to 2d array code example
Example 1: numpy generate random 2d array
import numpy as np
a=np.random.rand(3,3)
print(a)
Example 2: 2d array python initialize
>>> b = [['a']*3]*3
>>> b
[['a', 'a', 'a'], ['a', 'a', 'a'], ['a', 'a', 'a']]
>>> b[1][1]
'a'
>>> b[1][1] = 'b'
>>> b
[['a', 'b', 'a'], ['a', 'b', 'a'], ['a', 'b', 'a']]