Skip to content

fix: streamline mass matrix validation in FlowMCBased class#835

Merged
Qazalbash merged 1 commit into
mainfrom
fix-flowMC-mass-matrix-reading
May 28, 2026
Merged

fix: streamline mass matrix validation in FlowMCBased class#835
Qazalbash merged 1 commit into
mainfrom
fix-flowMC-mass-matrix-reading

Conversation

@Qazalbash

Copy link
Copy Markdown
Member

No description provided.

@Qazalbash Qazalbash self-assigned this May 28, 2026
@Qazalbash Qazalbash added the internal An internal refactor or improvement label May 28, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies the validation logic for mass_matrix in flowMC_based.py by removing the explicit check for list types. However, this change introduces a potential AttributeError if mass_matrix is passed as a list, because it is no longer converted to a JAX array before its ndim attribute is accessed. A review comment correctly identifies this issue and suggests converting mass_matrix using jnp.asarray to ensure compatibility.

Comment thread src/gwkokab/analysis/core/flowMC_based.py
@Qazalbash Qazalbash merged commit 03ee026 into main May 28, 2026
6 checks passed
@Qazalbash Qazalbash deleted the fix-flowMC-mass-matrix-reading branch May 28, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant