What is the difference between the two notations for 'slicing' an array?
from numpy import ones
arr = ones((3,3))
arr[:, 0] += 1
arr[..., 1] += 2
#arr
#array([[2, 3, 1],
# [2, 3, 1],
# [2, 3, 1]])
Are they interchangeable?
What is the difference between the two notations for 'slicing' an array?
from numpy import ones
arr = ones((3,3))
arr[:, 0] += 1
arr[..., 1] += 2
#arr
#array([[2, 3, 1],
# [2, 3, 1],
# [2, 3, 1]])
Are they interchangeable?