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

Small updates in grid #1320

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

alessiofumagalli
Copy link
Contributor

Proposed changes

In PyGeoN we are moving toward csc_array instead of csc_matrix, this requires little modifications in the grid. A multiplication and the conversion from a np.matrix to np.ndarray (twice).

Types of changes

What types of changes does this PR introduce to PorePy?
Put an x in the boxes that apply.

  • Minor change (e.g., dependency bumps, broken links).
  • Bugfix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Testing (contribution related to testing of existing or new functionality).
  • Documentation (contribution related to adding, improving, or fixing documentation).
  • Maintenance (e.g., improve logic and performance, remove obsolete code).
  • Other:

Checklist

Put an x in the boxes that apply or explain briefly why the box is not relevant.

  • The documentation is up-to-date.
  • Static typing is included in the update.
  • This PR does not duplicate existing functionality.
  • The update is covered by the test suite (including tests added in the PR).
  • If new skipped tests have been introduced in this PR, pytest was run with the --run-skipped flag.

@alessiofumagalli
Copy link
Contributor Author

In PyGeoN we are moving toward the family of sparse arrays instead of using the sparse matrices.

This has a very little implications for PorePy (actually no implications), but we wish to avoid duplicated code since the modifications are perfectly compatible and tiny.

Extensive updates is less funny but doable in some hours of work: https://docs.scipy.org/doc/scipy/reference/sparse.migration_to_sparray.html

I would like to get your take on this before declaring this pr as ready to be evaluated, in the meantime we are finalizing our transition.

@alessiofumagalli
Copy link
Contributor Author

As always, I appreciate your help!

Copy link
Contributor

@keileg keileg left a comment

Choose a reason for hiding this comment

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

Thanks, @alessiofumagalli.

We will likely also make the transition at some point, either in one go or gradually. We have been waiting, partly since it took a while to get indexing fully implemented in arrays, but hopefully these issues are gone with scipy v1.15.

@alessiofumagalli
Copy link
Contributor Author

Thanks a lot!

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.

2 participants