0

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?

izxle
  • 346
  • 2
  • 16

0 Answers0