[Numpy-discussion] fromfunction() bug?
Alan G Isaac
aisaac at american.edu
Thu Mar 13 18:18:30 EDT 2008
This is how I would hope ``fromfunction`` would work
and it matches the docs. (See below.) You can fix
the example ...
Cheers,
Alan Isaac
>>> help(N.fromfunction)
Help on function fromfunction in module numpy.core.numeric:
fromfunction(function, shape, **kwargs)
Returns an array constructed by calling a function on a tuple of number
grids.
The function should accept as many arguments as the length of shape and
work on array inputs. The shape argument is a sequence of numbers
indicating the length of the desired output for each axis.
The function can also accept keyword arguments (except dtype), which will
be passed through fromfunction to the function itself. The dtype argument
(default float) determines the data-type of the index grid passed to the
function.
More information about the NumPy-Discussion
mailing list