Hi,
I continued working on the problem. And I found a solution. Here's
what I was looking for:
sage: D=dsage.start_all()
sage: def f(n,m):
... return n*m
...
sage: R=D.map(f, [1,2,3,4,5], [0,1,2,3,4])
This actually does what I want.
The error message was confusing me. Would it be possible to have a
better error message for this mistake and maybe add the above example
to D.map? which is actually showing for function taking only one
argument. In fact, the text was not clear enough for me:
sage: D.map?
[SNIP]
Apply function to every item of iterable and return a list
of the
results. If additional iterable arguments are passed,
function must
take that many arguments and is applied to the items from
all
iterables in parallel.
INPUT:
f -- a function
*args -- iterables containing the parameters to the
function
EXAMPLE:
sage: d = dsage.start_all()
Going into testing mode...
sage: d.is_connected()
True
sage: def f(n):
... return n*n
...
sage: j = d.map(f, [25,12,25,32,12])
sage: j
[No output yet.,
No output yet.,
No output yet.,
No output yet.,
No output yet.]
Thanks for consideration,
JPL
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---