Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey

All Questions

Tagged with
3 votes
1 answer
250 views

cancellation in numpy array operation including a scalar

I'm using NumPy version 1.7.1. Now I came across a strange cancellation I don't understand: >>> import numpy as np >>> a = np.array([ 883, 931, 874], dtype=np.float32) ...
roettm's user avatar
  • 33
5 votes
2 answers
6k views

Differences between Matlab and Numpy and Python's `round` function

Simplified question Can I make Numpy agree with Matlab and Python's round? Matlab 2013a: >> round(-0.5) ans = -1 Python (using a Numpy array, or just a scalar, same result): >>>...
Ahmed Fasih's user avatar
  • 6,967