Professional Documents
Culture Documents
Company
Company
operation
NumPy Vectorization
NumPy vectorization involves
performing mathematical operations
on entire arrays, eliminating the
need to loop through individual
elements.
We can perform indexing on arrays in many ways. Let's discuss how indexing is performed
on arrays.
Indexing Using Index Arrays
In NumPy arrays, when arrays are used as indexes to access groups of elements, this is
called indexing using index arrays. NumPy arrays can be indexed with arrays or with any
other sequence like a list, etc.
Types of Indexing
There are two types of indexing:
Basic indexing
Advanced indexing
Basic Slicing and indexing
Using basic indexing and slicing we can access a particular element or group of
elements from an array. Basic indexing and slicing return the views of the
original arrays.