numpy randn with a shape of another array

Solutions on MaxInterview for numpy randn with a shape of another array by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
showing results for - "numpy randn with a shape of another array"
Paul
06 Jan 2018
1a = np.zeros([2, 3])
2print(a.shape)
3# outputs: (2, 3)
4b = np.random.randn(*a.shape)
5print(b.shape)
6# outputs: (2, 3)
7