filmov
tv
Reshaping & Indexing NumPy Arrays - Learn NumPy Series

Показать описание
This Video is a part of a NumPy Tutorial Series: Start the entire series here:
We're continuing on in our NumPy series by talking about how to reshape and index numpy arrays.
We'll talk about reshaping using the reshape method and .T transposes
We'll also talk about how to select a row, column, and specific value from a numpy array using indexing.
Thanks for all the support! Almost to 5k subscribers. Insanely awesome. Thank you for all the kind words!
Join The Socials -- Picking Shoutouts Across YouTube, Insta, FB, and Twitter!
*****************************************************************
Full code from the video:
import numpy as np
#Create simple array
# New Attribute Array Size
# Number of Rows times Number of Columns
# Reshape Array
print(array_b)
#transpose array_a
array_c = array_a.T
print(array_c)
# Access Row
print(array_c[0])
# Access Columns
print(array_c[:,0])
# Access Specific Values
print(array_c[1,1])
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!
We're continuing on in our NumPy series by talking about how to reshape and index numpy arrays.
We'll talk about reshaping using the reshape method and .T transposes
We'll also talk about how to select a row, column, and specific value from a numpy array using indexing.
Thanks for all the support! Almost to 5k subscribers. Insanely awesome. Thank you for all the kind words!
Join The Socials -- Picking Shoutouts Across YouTube, Insta, FB, and Twitter!
*****************************************************************
Full code from the video:
import numpy as np
#Create simple array
# New Attribute Array Size
# Number of Rows times Number of Columns
# Reshape Array
print(array_b)
#transpose array_a
array_c = array_a.T
print(array_c)
# Access Row
print(array_c[0])
# Access Columns
print(array_c[:,0])
# Access Specific Values
print(array_c[1,1])
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!
Комментарии