python newbie. I can't understand the following about numpy arrays:
x = np.array([[0, 1],[2,3],[4,5],[6,7]])
x
array([[0, 1],
[2, 3],
[4, 5],
[6, 7]])
x.shape
(4, 2)
y = x[:,0]
y
array([0, 2, 4, 6])
y.shape
(4,)Why is the shape for y reported as (4,) ? I expected it to be a (4,1) array. thanks in advance -- https://mail.python.org/mailman/listinfo/python-list
