AI engineering glossary · NumPy pandas visualization
What is fancy indexing?
Fancy indexing: Selecting array elements by passing a list or array of integer positions instead of a slice. It lets you pick arbitrary elements in any order, or repeat them, and unlike slicing it always returns a new copy of the data rather than a view.
Fancy indexing: an example
a = np.array([10, 20, 30, 40]); a[[3, 0, 0]] returns array([40, 10, 10]).
Related terms
More NumPy pandas visualization terms
Where you learn it
Fancy indexing is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.