NumPy Array Advanced Indexing Practice - Learn NumPy Series

NumPy Array Advanced Indexing Practice - Learn NumPy Series


Full Code From This Example:

YouTube Description:

This video is apart of a full learn NumPy series. Check out the playlist here: In this one we'll get some more practice indexing numpy arrays with some advanced methods. Try the projects out too and let me know how you do them! Join The Socials -- Picking Shoutouts Across YouTube, Insta, FB, and Twitter! FB - Insta - Twitter - LinkedIn - GitHub - Thanks for all the support! 4960+ subscribers! How incredible. Thank you all for continuing to support me on this journey. ***************************************************************** Full code from the video: import numpy as np # Introduce arange function array_a = np.arange(0,100,5) print(array_a) print(array_a.size) array_a = array_a.reshape(4,5) print(array_a) # Return Every Last Value of Row with Negative Indexing print(array_a[:,-1]) # boolean practice: array_above_50 = array_a[array_a #greater than (YouTube Description doesn't allow angle brackets 50] print(array_above_50) #Indexing using Python Slices on one dimensional array print(array_above_50[0:len(array_above_50):2]) #Taking Slice from Each Row of Array print(array_a[:,0:5:2]) # Challenges Reverse each array row using negative indexing. # index all values greater than 20 and less than 75, make everything else a value of zero and retain shape. Packages (& Versions) used in this video: Python 3.7 NumPy 1.17 ***************************************************************** Code from this tutorial and all my others can be found on my GitHub: Check out my website: If you liked the video - please hit the like button. It means more than you know. Thanks for watching and thank you for all your support!! Always looking for suggestions on what video to make next -- leave me a comment with your project! Happy Coding!

Enjoy this content? Consider Subbing to the Youtube channel

Derrick Sherrill

By: Derrick Sherrill

Thanks for visiting my page! I'm working hard to make the best content I can for you. I love watching people learn and teaching others. Happy Coding!

Become a Patreon!