[SciPy-User] Using special functions with keyword arguments
gary ruben
gary.ruben at gmail.com
Thu Mar 10 16:49:42 EST 2016
I haven't tried but I'd look at numpy.vectorize and functools.partial as
possible ways to do this.
Gary
On 11 Mar 2016 7:30 am, "Dave" <dave.hirschfeld at gmail.com> wrote:
> Pauli Virtanen <pav <at> iki.fi> writes:
>
> >
> > Mon, 07 Mar 2016 17:00:57 -0800, Lutz
> Maibaum kirjoitti:
> > [clip]
> > > Is it still possible to call sph_harm
> (and presumably other special
> > > functions) with keyword arguments?
> >
> > Ufuncs in general don't support keyword
> arguments, so no.
> >
> > > The reason I am trying to do this is
> > > that I would like to wrap sph_harm in
> a functools.partial object that
> > > takes only a single argument, and that
> I can then pass to
> > > multiprocessing.Pool.map.
> >
> > You can probably still achieve that in
> some way.
> >
>
> I've run into this restriction before in
> the context of numba generated ufuncs. Is
> there some fundamental problem supporting
> kwargs in ufuncs or is it technically
> possible to do?
>
> Thanks,
> Dave
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> https://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20160311/4f32544f/attachment.html>
More information about the SciPy-User
mailing list