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

Explicit Exception for combined fit edge case #202

Merged
merged 1 commit into from
Jul 14, 2023
Merged

Conversation

fjosw
Copy link
Owner

@fjosw fjosw commented Jul 14, 2023

This PR addresses an issue in combined fits that @PiaLJP had seen in the past and @matteo-dc ran into this week:
When doing a combined fit and one of the fit functions is just a constant then the shape casting fails and one gets an error. The solution we found in the past is to add x * 0 to the constant in the fit function to obtain the correct shape.

This PR does not fix the issue as I wasn't able to come up with a good solution, yet. Instead, I added an explicit exception that informs the user and suggests our workaround. For the future, it would of course be desirable to correct the shape casting for this edge case.

@fjosw fjosw requested a review from s-kuberski July 14, 2023 12:10
@s-kuberski
Copy link
Collaborator

Interesting problem. I'll try to think of a solution, but in the meanwhile, your addition to the Exception seems to be quite helpful.

@fjosw fjosw merged commit 5c2a6de into develop Jul 14, 2023
10 checks passed
@fjosw fjosw deleted the fix/fit_to_constant branch July 14, 2023 13:26
This pull request was closed.
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