Skip to content

Conversation

@paulromano
Copy link
Contributor

Description

In recent versions of scipy, they have introduced sparse arrays (e.g., csc_array) that generalize the existing sparse matrix classes to N dimensions. The scipy documentation recommends migrating to using sparse arrays rather than sparse matrices. This PR completes that migration for OpenMC, preferentially using sparse arrays for scipy 1.15+ (when they became fully supported) and falling back to sparse matrices for earlier versions.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@shimwell
Copy link
Member

I guess another option is to change the pyproject.toml to ensure scipy 1.115.0 or newer is installed.

@paulromano
Copy link
Contributor Author

@shimwell We follow SPEC 0 with respect to minimum versions required, which currently says we should support scipy 1.12+

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