0% found this document useful (0 votes)
13 views42 pages

Numpy Indexing and Array Manipulation Guide

Numpy utilizes zero indexing and allows for negative indexing starting from -1. Ravel modifies the original array while flatten creates a copy, and broadcasting and vectorization are preferred over loops for efficiency. Additionally, NaN values cannot be compared, and there are methods to replace infinity values.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views42 pages

Numpy Indexing and Array Manipulation Guide

Numpy utilizes zero indexing and allows for negative indexing starting from -1. Ravel modifies the original array while flatten creates a copy, and broadcasting and vectorization are preferred over loops for efficiency. Additionally, NaN values cannot be compared, and there are methods to replace infinity values.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Numpy follow zero indexing and the negative indexing startfrom -1

Ravel is used to modify the array which affects the array while the flatten is used for the copy
array
Loops are slow
So we use broad casting without usng loops
Vectorization is applying the formula or a condition without a loop
We cannot compare nan values
To replace the infinity values

You might also like