79323852

Date: 2025-01-02 13:32:17
Score: 1
Natty:
Report link

I would checkout the np.hsplit and np.vsplit methods. You'll find details in the numpy api refrence.

If you do

blocks = [np.vsplit(i, 2) for i in np.hsplit(matrix, 2)]

then blocks will be an array containing your A,B,C and D matrices.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Johannes VÄlvik