Matrix Product

easynumpy_basics

Implement matrix_product(a, b).

Given a matrix a of shape (m, k) and a matrix b of shape (k, n), return their matrix product a @ b (shape (m, n)). For example, a 5×3 matrix times a 3×2 matrix gives a 5×2 matrix. No for/while loops.

Constraints
  • no for/while loops

Your solution

Edit matrix_product and run the real pytest suite in your browser — no install required. Your code is saved locally.

⌘/Ctrl + ↵

Loading the Python runtime (first run only)…

Hints

Hint 1

The @ operator (or np.dot) computes the real matrix product.