I’m implementing Strassen’s Matrix Multiplication using python. In divide step, we divide a larger matrix into smaller sub-matrices. Is there a built-in numpy function to split a matrix?
I’m implementing Strassen’s Matrix Multiplication using python. In divide step, we divide a larger
Share
Not exactly, but using array slicing notation you should be able to do it yourself pretty easily.
Make B the top-left 2×2 in A:
Note that B is a view, it shares data with A
If you need to copy the data from A, use the copy method: