Daniel Fetchinson wrote:
So far I was working under the assumption that the numpy array implementation can be used as a drop-in replacement for native python lists, i.e. wherever I see a list 'a' and I want to speed up my numerical calculations I just replace it with 'numpy.array( a )' and everything will work just as before. It took me about half a day to track down a bug which was a result of this assumption being wrong.
Who was it who said "Assumption is the mother of all screw-ups"? :-)
The fact that the following two outputs are not the same is a bug or a feature of numpy?
Well, it's in the documentation: http://numpy.scipy.org/numpydoc/numpy-9.html#pgfId-66636 -- http://mail.python.org/mailman/listinfo/python-list