[Numpy-discussion] vectorize in new.instancemethod and *args
joep
josef.pktd@gmail....
Fri Sep 26 11:39:59 CDT 2008
On Sep 26, 11:35 am, joep <josef.p...@gmail.com> wrote:
> I have a question about the use of vectorize in new.instancemethod:
>
> # case D: class with vectorize with nin adjustment -> broken
> # nin is not correctly used by vectorize
>
> class D(object):
> def __init__(self):
> # define the vectorized function
> vecfunc = vectorize(funcm)
> vecfunc.nin = 2
> self.funcm = new.instancemethod(vecfunc,self,A)
correction case D works
vecfunc.nin = 3 works
my silly mistake, not counting self as an argument
Josef
More information about the Numpy-discussion
mailing list