[SciPy-User] Using special functions with keyword arguments

Dave dave.hirschfeld at gmail.com
Thu Mar 10 15:29:18 EST 2016


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




More information about the SciPy-User mailing list