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 incorrect format of inv_metric when only 1 parameter in model #935

Merged
merged 4 commits into from
Mar 19, 2024

Conversation

venpopov
Copy link
Contributor

@venpopov venpopov commented Mar 19, 2024

Submission Checklist

  • Run unit tests
  • Declare copyright holder and agree to license (see below)

Summary

Fixes #934. Now it checks in inv_matrix() function whether the input is a scalar for each chain, and if so, makes it an array with dimension 1. It also corrects the behavior of diag() when matrix=TRUE, which previously produced an empty matrix with a scalar inv_metric.

Copyright and Licensing

Please list the copyright holder for the work you are submitting
(this will be you or your assignee, such as a university or company):
Vencislav Popov

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the following licenses:

Copy link
Member

@jgabry jgabry left a comment

Choose a reason for hiding this comment

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

This looks good, thanks! I think the windows-latest (devel) failure is unrelated to this.

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.33%. Comparing base (82f9d9a) to head (41dbaf8).

❗ Current head 41dbaf8 differs from pull request most recent head c69ef19. Consider uploading reports for the commit c69ef19 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #935      +/-   ##
==========================================
+ Coverage   88.32%   88.33%   +0.01%     
==========================================
  Files          12       12              
  Lines        4549     4553       +4     
==========================================
+ Hits         4018     4022       +4     
  Misses        531      531              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jgabry jgabry merged commit ae1b7b3 into stan-dev:master Mar 19, 2024
12 checks passed
@venpopov venpopov deleted the inv_metric_1par branch March 22, 2024 12:36
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.

Wrong inv_metric format passed to cmdstan with only 1 parameter
3 participants