Skip to content

Conversation

@UdohNakamura
Copy link
Contributor

This patch replaces the explicit inverse computation la.inv(I - βQ) with la.solve(I - βQ, βQd) in price_single_beliefs for better numerical stability and efficiency.

The output remains identical to the previous implementation.

Refactor price_single_beliefs function to improve clarity and efficiency.
@UdohNakamura
Copy link
Contributor Author

I also found that np.linalg.solve works the same here, so removing scipy might be possible.
However, I'm not confident about this, so I’d like to leave the decision to the reviewers.

@jstac
Copy link
Contributor

jstac commented Nov 4, 2025

Many thanks @UdohNakamura !

@mmcky This looks good to me. Please check if we can remove scipy.

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