|
From: Pierre H. <pie...@cr...> - 2012-09-26 15:04:55
|
Le 26/09/2012 15:25, Benjamin Root a écrit : > > Actually, if you are using the latest numpy (the 1.7 beta), that will > also not work unless you are using py3k or did "from __future__ import > division". Well, actually, using np.divide will always result in > integer division (this may or may not be a bug). Good point, I forgot I had set "from __future__ import division" some months ago in my IPython startup settings. So indeed, explicit casting to float is the safest approach. Best, Pierre |