[SciPy-user] vectorize bug/feature

Yaroslav Bulatov yaroslavvb at gmail.com
Sat Nov 12 13:29:11 CST 2005

Suppose my function f returns 0,  .1, .2 for values 0,1,2.
When I do ff=vectorize(f); ff([1,2,3]), I get [0,0,0] which is
counter-intuitive. Apparently it sees that f(0) is a long, so it makes
the array of longs, and .1,.2 turn into 0.

More information about the SciPy-user mailing list