More helpful error when passing vector or tensor to compute_hessian#231
Merged
joewallwork merged 3 commits intomainfrom Mar 6, 2026
Merged
More helpful error when passing vector or tensor to compute_hessian#231joewallwork merged 3 commits intomainfrom
compute_hessian#231joewallwork merged 3 commits intomainfrom
Conversation
stephankramer
requested changes
Mar 5, 2026
Collaborator
stephankramer
left a comment
There was a problem hiding this comment.
Oh actually, looking at the CI errors: I do think we should allow the input of compute_hessian to be a (UFL) scalar expression rather just a single function - which it indeed appears we are testing for
Co-authored-by: Stephan Kramer <s.kramer@imperial.ac.uk>
Member
Author
|
Oops I accidentally pushed my fix to Interesting that it auto-closed this PR. |
Collaborator
|
Ah good to protect it, would have happened to me at some point otherwise! |
joewallwork
added a commit
that referenced
this pull request
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #224.
As reported by @Patol75 in #224, the error message isn't particularly helpful if you pass a vector or tensor field to
RiemannianMetric.compute_hessian. This PR hopefully fixes that.