Answers for "random matrix make numpy"

2

random matrix python

np.random.rand(3,2)
Posted by: Guest on March-21-2020
0

numpy randn with a shape of another array

a = np.zeros([2, 3])
print(a.shape)
# outputs: (2, 3)
b = np.random.randn(*a.shape)
print(b.shape)
# outputs: (2, 3)
Posted by: Guest on December-17-2020

Python Answers by Framework

Browse Popular Code Answers by Language