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: [ Ссылка ]
📺Channel: [ Ссылка ]?
▶️Watch Latest Python Content: [ Ссылка ]
▶️Watch Latest Other Content: [ Ссылка ]
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): [ Ссылка ]
Libro de Python (Español): [ Ссылка ]
Affordable Laptop: [ Ссылка ]
Machine Learning Book: [ Ссылка ]
Libro de Aprendizaje automatico: [ Ссылка ]
Neural Networks for Babies: [ Ссылка ]
Video Equipment:
Background Color Light: [ Ссылка ]
Key Light: [ Ссылка ]
Microphone: [ Ссылка ]
Other:
Underrated Cheap Basketball: [ Ссылка ]
Amazing Basketball shorts: [ Ссылка ]
Python Tutorial - Python Numpy Array Multiplication
Теги
np.shape()np.reshape()python tutorial for beginners with examplesPython NumpyPython youtube channelPython Programming Channelpython 8python 10python 7python 6python array broadcastingnumpy python tutorial for data sciencenumpy tutorialnumpy tutorial for beginnersnumpy python tutoiralnumpy multiplicationmultiply numpynumpy multiplypython numpy for beginnersnp.dot()numpy inner product