Re: Scipy: vectorized function does not take scalars as arguments

2006-05-25 Thread ago
I have installed numpy-0.9.6 I haven't tried 0.9.8. -- http://mail.python.org/mailman/listinfo/python-list

Scipy: vectorized function does not take scalars as arguments

2006-05-24 Thread ago
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? -- http://mail.python.org/mailman/listinfo/python-list

Re: Scipy: vectorized function does not take scalars as arguments

2006-05-24 Thread Robert Kern
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

Re: Scipy: vectorized function does not take scalars as arguments

2006-05-24 Thread Travis E. Oliphant
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? Vectorize handles scalars in recent versions of NumPy. Which