From the course: Complete Guide to Parallel and Concurrent Programming in Python
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Challenge: Matrix multiply in Python - Python Tutorial
From the course: Complete Guide to Parallel and Concurrent Programming in Python
Challenge: Matrix multiply in Python
(lively music) - [Instructor] Your goal for this challenge is to design and build a parallel program that calculates the product of two matrices, which is a common mathematical operation that can benefit a lot from parallel computation. Each matrix will be represented in Python as a two-dimensional list of lists containing numeric values. The first dimension of the list structure indexes rows of the matrix and is usually represented with the variable letter i. The second dimension indexes columns and is represented with the letter j. So, for example, if the first index value is 0, that refers to the top row of the matrix. And if the second value is 2 that identifies the element at index 2 along that top row. It's common to represent the individual elements of a matrix using notation With two subscripts like this. With the first subscript indicating the row and the second indicating the column. When it comes to multiplication, two matrices can be multiplied together if the number of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
Welcome to the challenges39s
-
(Locked)
Challenge: Matrix multiply in Python5m 29s
-
(Locked)
Solution: Matrix multiply in Python7m 58s
-
(Locked)
Challenge: Merge sort in Python4m 18s
-
(Locked)
Solution: Merge sort in Python5m 20s
-
(Locked)
Challenge: Download images in Python2m 7s
-
(Locked)
Solution: Download images in Python4m 9s
-
-