Mark Dickinson added the comment: This is really a question for a NumPy mailing list, not for the Python bug tracker.
But the answer is that you're doing computations using 32-bit integers, and those computations overflow, leading to the odd results you're seeing. It looks as though your Octave computation is performed using floats, hence the different results. Closing here: this isn't a bug (not even a NumPy bug, I'm afraid), and it's unrelated to core Python. ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30930> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com