[Neuroimaging] util.Function probs after update
Michael Waskom
mwaskom at nyu.edu
Fri Sep 8 13:57:53 EDT 2017
Hi Joerg,
The docstring for the class is correct. You can pass a callable object to
the Function class constructor and it will internally get converted to a
string before the interface input trait is set. As far as I remember, when
the interface was written it was necessary to use strings (and not callable
objects) as the actual trait values. I do not know whether that changed at
some point ... perhaps it would help if you showed the code that used to
work and now fails.
Best,
Michael
On Thu, Sep 7, 2017 at 8:49 AM, Jörg Stadler <jstadler at lin-magdeburg.de>
wrote:
> Hi,
>
> my script was running with nipype 0.13.-dev and I thought it is a good
> idea to update to the lasted dev version ;)
>
> I got stocked with an error from util.Function.
>
>
> After spending some time reading the docs I realized the change from
> inputs.function = function
> to
> inputs.function_str = function definition as a string
>
> This drives my crazy.
>
> Is there an easy way to have the old behavior or do I have to go the
> long way?
>
> https://nipype.readthedocs.io/en/latest/devel/python_interface_devel.html
>
>
> BTW: The docstring of util.wrappers.Function is outdated:
>
> function : callable
> callable python object. must be able to execute in an
> isolated namespace (possibly in concert with the ``imports``
> parameter)
>
> is now
> function_str: ....
>
> Joerg
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20170908/43014693/attachment.html>
More information about the Neuroimaging
mailing list