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
  • 386
  • 1
  • 3
  • 19

0 Answers0