Matrix Product in Pure Python using Nested Loops and Comprehensions [with code]

Опубликовано: 25 Ноябрь 2023
на канале: PatchyPython
28
0

Multiplying matrices is the algebraic operation that's at the base of much of computer graphics, computer vision and machine learning. In this video, we start from the definition of matrix product and show how you can implement it yourself, using two different techniques: nested "for" loops, and nested list comprehensions. Whether you are learning how to program matrix operations or you are a programmer trying to wrap your head around the algebra, I hope this video will be of interest to you. Please scroll down for a link to the full code as a Jupyter notebook (code will open in the browser, no installation required).

==== Contents: ====
00:00 Introduction and definition
02:05 An example in ASCII graphics
03:28 Nested for loop implementation: a helper function
04:36 Nested for loop implementation: the main function
09:41 Testing the for loop implementation: an example
11:40 Implementation using List Comprehensions
15:15 The free Jupyter Notebook with the code (link below)

==== Resources: ====
Patchy video on how to create a constant matrix:
   • 2D "Arrays" and Matrices in Pure Pyth...  
Jupyter Notebook with the code:
https://tinyurl.com/bded9d7b
(Code will open on Google Colab, no installation required)


Смотрите видео Matrix Product in Pure Python using Nested Loops and Comprehensions [with code] онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь PatchyPython 25 Ноябрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 28 раз и оно понравилось 0 людям.