Skip to content

Fix GMRF not working with LinearRTO when scalar is passed as mean - #661

Draft
jeverink wants to merge 6 commits into
CUQI-DTU:mainfrom
jeverink:GMRF-mean-setting-fix
Draft

Fix GMRF not working with LinearRTO when scalar is passed as mean#661
jeverink wants to merge 6 commits into
CUQI-DTU:mainfrom
jeverink:GMRF-mean-setting-fix

Conversation

@jeverink

Copy link
Copy Markdown
Collaborator

Sets the mean of a GMRF to a vector of the correct length when a scalar is passed.
This is required for using the GMRF as a prior with the Linear RTO sampler.

Closes #627

@jeverink
jeverink marked this pull request as ready for review June 20, 2025 13:29

@chaozg chaozg 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.

LGTM

@jeverink
jeverink requested a review from amal-ghamdi June 23, 2025 08:03

@amal-ghamdi amal-ghamdi 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.

Thank you @jeverink for the fix.

one comment: In general we try to support inferring length either from the geometry or from other mutable properties (mean and prec in this case). Can you expand the update to support this? for example if prec is an array, then dimension can be inferred from it.

Comment thread cuqi/distribution/_gmrf.py Outdated
Co-authored-by: amal-ghamdi <amal.m.alghamdi@gmail.com>
@jeverink
jeverink marked this pull request as draft September 2, 2025 08:21
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.

Mean of GMRF seems not properly set

3 participants