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

BUG: Fix work array construction for various weight shapes. #18741

Merged
merged 3 commits into from Jun 28, 2023
Merged

Conversation

rkern
Copy link
Member

@rkern rkern commented Jun 25, 2023

Reference issue

Closes gh-18739

What does this implement/fix?

The work array size depends on the shape of the we weight array, which can be of a wide variety of shapes. The current code assumed it was one particular kind and failed to index we.shape correctly. This method gets called when set_job(del_init=1) is called, so it does not show up frequently. This fix takes care of all of the other cases.

@j-bowhay j-bowhay added the defect A clear bug or issue that prevents SciPy from being installed or used as expected label Jun 25, 2023
@j-bowhay j-bowhay added this to the 1.12.0 milestone Jun 25, 2023
@rkern
Copy link
Member Author

rkern commented Jun 25, 2023

AFAICT, all of the failures are from unrelated pieces of code.

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Thanks @rkern, this LGTM. I'll mark it for backporting, this can go into 1.11.1 pretty easily.

@rgommers rgommers merged commit 899f4ef into main Jun 28, 2023
21 of 24 checks passed
@rgommers rgommers deleted the fix/odr-work branch June 28, 2023 10:36
@rgommers rgommers added the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label Jun 28, 2023
@tylerjereddy tylerjereddy modified the milestones: 1.12.0, 1.11.1 Jun 28, 2023
tylerjereddy pushed a commit to tylerjereddy/scipy that referenced this pull request Jun 28, 2023
@tylerjereddy tylerjereddy removed the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.odr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: run method of scipy.odr.ODR class fails when delta0 parameter is set
4 participants