[Numpy-discussion] fromfunction() bug?
OrionBelt
orionbelt2@gmail....
Thu Mar 13 17:06:34 CDT 2008
Hi,
According to the fromfunction() example:
http://www.scipy.org/Numpy_Example_List_With_Doc#head-597e63df5a6d490abd474ffd84d0419468c8329a
fromfunction() should return an array of integers. But when i run the
example, i obtain an array of floats:
>>> from numpy import *
>>> def f(i,j):
... return i**2 + j**2
...
>>> fromfunction(f, (3,3))
array([[ 0., 1., 4.],
[ 1., 2., 5.],
[ 4., 5., 8.]])
I am on version 1.0.4, same as the examples.
Is this a bug?
More information about the Numpy-discussion
mailing list