It is possible to make a selection from ndarray that is a non-tuple sequence, ndarray object of integer or Boolean data type, or a tuple with at least one item being a sequence object. Advanced indexing always returns a copy of the data. As against this, the slicing only presents a view.
There are two types of advanced indexing − Integer and Boolean.
Integer Indexing:
This mechanism helps in selecting any arbitrary item in an array based on its Ndimensional index. Each integer array represents the number of indexes into that dimension. When the index consists of as many integer arrays as the dimensions of the target ndarray, it becomes straightforward.
Boolean Array Indexing:
This type of advanced indexing is used when the resultant object is meant to be the result of Boolean operations, such as comparison operators.
#numpy #pythonnumpy #pythontutorial #learnpython #arrayattributes #array
******************************************************************
Did you enjoy the video? If so, give it a like above!
Subscribe to our channel for more techie video
👉 https://www.youtube.com/c/DeepakRai?s...
Keep Learning!! Keep Growing!!
P.S. Make sure to keep up with us by clicking the bell!