[Numpy-discussion] fromfunction() bug?
Alan G Isaac
aisaac@american....
Thu Mar 13 17:18:30 CDT 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