March 17, 2010
2:08 p.m.
Is the zero-fill intentional? If so, it is documented? (NumPy 1.3) Alan Isaac
a = np.arange(5) b = a.copy() c = np.resize(a, (5,2)) b.resize((5,2)) c # as expected array([[0, 1], [2, 3], [4, 0], [1, 2], [3, 4]]) b # surprise! array([[0, 1], [2, 3], [4, 0], [0, 0], [0, 0]])