On Thu, Jul 19, 2012 at 5:52 AM, Cheng Li wrote:
> Hi All,
>
> ** **
>
> I have spot a strange behavior of numpy.fromfunction(). The sample codes
> are as follows:
>
> >>> import numpy as np
>
> >>> def myOnes(i,j):
>
> return 1.0
>
> >>> a = np.fromfunction(myO
Hi All,
I have spot a strange behavior of numpy.fromfunction(). The sample codes are
as follows:
>>> import numpy as np
>>> def myOnes(i,j):
return 1.0
>>> a = np.fromfunction(myOnes,(2000,2000))
>>> a
1.0
Actually what I expected is that the function will return a 20