All Questions
2 questions
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)
...
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):
>>>...