O'Reilly logo
  • Iván Villamizar thinks this is interesting:

Regardless of how many dimensions the array has (here, only 2), the result of fancy indexing is always one-dimensional.

From

Cover of Python for Data Analysis, 2nd Edition

Note

the result of fancy indexing is not always one-dimensional.

arr = np.arange(96).reshape((8,4,3))

arr[[1, 5, 7, 2], [0, 3, 1, 2]]

returns a two-dimensional array: array([[12, 13, 14], [69, 70, 71], [87, 88, 89], [30, 31, 32]])