Descargar el Código: patreon.com/pythonmaraton
Join Patreon: patreon.com/pythonmaraton
^Downloadable code & more! This is a quick tutorial on python arrays or matrices multiplication. This goes through creating two arrays and multiplying them together. np.array() is how matrices or arrays are formed in Python. It is important to make sure the matrices are shaped the proper way. You can check this by using the np.shape() function. To change a shape of a matrix you can use np.reshape(). The @ symbol allows you to do matrix multiplication, but make sure the dimensions are right to avoid errors.
This is a Python anaconda tutorial for help with coding, programming, or computer science. These are short python videos dedicated to troubleshooting python problems and learning Python syntax. For more videos see Python Help playlist by Rylan Fowers.
✅Subscribe: / @pythonmaraton
📺Channel: / @pythonmaraton
▶️Watch Latest Python Content: • Python String Slice and List Slice
▶️Watch Latest Other Content: • Video
In python we will import numpy as np
To define an array we type np.array
parentheses, bracket to start the matrix, then another bracket to enter the first row. After each row close with a bracket. At the end close the entire matrix with one more bracket and finally close your parentheses
This is what the array will look like when you print it out
We will save this 3x3 array as x
Here we are reshaping our x matrix to be a one long matrix that is 1 row by 9 columns
This is important to do sometimes because In matrix multiplication, the dimensions need to line up. An easy way to remember how to know if the dimensions will work is to look at the number of columns of the first matrix (or second dimension number) and the number of rows of the second matrix (or first dimension number). Those numbers need to be the same for it to work
Now I have defined a y matrix so we can see multiplication.
Notice the x is shaped (3,3) and the y is (3,2) since 3=3 we can do this multiplication, but only if we do x first then y
To multiply you can use the @ symbol.
There you have it, that is how you multiply matrices or arrays in python
#PythonMarathon #LearnPython #PythonTutorial Learn Python:
Python Book (English): https://amzn.to/3HcwgLd
Libro de Python (Español): https://amzn.to/47woAhQ
Affordable Laptop: https://amzn.to/48L30Hb
Machine Learning Book: https://amzn.to/3RNmwfs
Libro de Aprendizaje automatico: https://amzn.to/3RVAFXU
Neural Networks for Babies: https://amzn.to/41SELoi
Video Equipment:
Background Color Light: https://amzn.to/3SgBDzG
Key Light: https://amzn.to/3NYwXLZ
Microphone: https://amzn.to/3H9UK89
Other:
Underrated Cheap Basketball: https://amzn.to/3RVzJTo
Amazing Basketball shorts: https://amzn.to/3vyRDUM
Sur cette page du site, vous pouvez voir la vidéo en ligne Python Tutorial - Python Numpy Array Multiplication durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Python Marathon 28 juillet 2018, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 11,599 fois et il a aimé 50 téléspectateurs. Bon visionnage!