In python 2.7.1 with numpy 1.5.1:
import numpy as np
B = np.matrix([[-float('inf'), 0], [0., 1]])
print B
Bm = B[1:, :]
Bm[:, 1] = float('inf')
print B
returns
[[-inf 0.]
[ 0. 1.]]
[[-inf 0.]
[ 0. inf]]
which is quite unexpected because I thought Bm was a copy (as in this question).
Any help figuring this out will be appreciated.