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 the sparse matrix in balancing ROM #186

Merged
merged 5 commits into from
May 15, 2022
Merged

Fix the sparse matrix in balancing ROM #186

merged 5 commits into from
May 15, 2022

Conversation

AntonioWR
Copy link
Contributor

A is a sparse matrix in csr_matrix(sparse) format, can not be directly passed into functions used in scipy _solver.py
Sparse matrices do not work well with Scipy (Version 1.7.3) in the following code, so A is transformed into a dense matrix here first.

A is a sparse matrix in csr_matrix(sparse) format, can not be directly passed into functions used in scipy _solver.py 
Sparse matrices do not work well with Scipy (Version 1.7.3) in the following code, so A is transformed into a dense matrix here first.
@ngoiz ngoiz changed the base branch from master to develop March 18, 2022 11:17
@ngoiz ngoiz self-requested a review March 18, 2022 11:17
@ngoiz ngoiz self-assigned this Mar 18, 2022
@ngoiz ngoiz added the bug label Mar 18, 2022
Copy link
Contributor

@ngoiz ngoiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for spotting this @AntonioWR! I have added a check to do the .todense() operation only if the A matrix is not a np.ndarray, but otherwise all good.

Thanks!

This closes #184

@ngoiz ngoiz merged commit f9b93fc into ImperialCollegeLondon:develop May 15, 2022
@ngoiz ngoiz linked an issue May 15, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scipy used for direct balancing method
2 participants