Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix matrix bindings for distributed matrices #28

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Fix matrix bindings for distributed matrices #28

merged 1 commit into from
Sep 26, 2024

Conversation

ckendrick
Copy link
Collaborator

This fixes some overloads for the Matrix class when used with distributed matrices or vectors.

For example, the following example would fail when A and C are pre-defined and distributed:

import numpy as np
import pylibROM.linalg as linalg

A = linalg.Matrix(5, 3, True)
A[0,0] = 1.; A[1,1] = 1.; A[2,2] = 1.
B = linalg.Matrix(3, 5, False)
B[0,0] = 1.; B[1,1] = 1.; B[2,2] = 1.
C = linalg.Matrix(3,3,True)
C = A.mult(B)

However, the A.mult(B, C) variation of this worked as expected. Bindings for other Matrix functions using similar syntax to C = A.mult(B) with distributed inputs are now fixed.

@ckendrick ckendrick requested review from ptranq and chldkdtn July 17, 2024 21:44
@chldkdtn
Copy link
Collaborator

If this is ready for review, please label it as RFR.

@ckendrick ckendrick merged commit 2840d1e into main Sep 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants