Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #numpy #randn #shape #array
ADD COMMENT
Topic
Name
7+5 =