Re: [Numpy-discussion] specifying array sizes in random vs. ones, zeros, etc

2010-11-11 Thread Robert Kern
On Thu, Nov 11, 2010 at 08:44, Michael Friedlander wrote: > I'm a hopeful Matlab refugee trying to understand the numpy way. > Perhaps someone can explain why some  numpy functions require > shape specifications in different ways. For example,  below I create > a random 2-by-3 array, and then a "o

[Numpy-discussion] specifying array sizes in random vs. ones, zeros, etc

2010-11-11 Thread Michael Friedlander
I'm a hopeful Matlab refugee trying to understand the numpy way. Perhaps someone can explain why some numpy functions require shape specifications in different ways. For example, below I create a random 2-by-3 array, and then a "ones" 2-by-3 array: A = numpy.random.randn(2,3) B = numpy.ones((2,3