ago wrote: > Once I vectorize a function it does not acccept scalars anymore. Es > > def f(x): return x*2 > vf = vectorize(f) > print vf(2) > > AttributeError: 'int' object has no attribute 'astype' > > Is this the intended behaviour?
More or less. It would be nice if it transparently handled the scalars, too, so if you would like to work on that, we'd be happy to incorporate your changes. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list