-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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: run method of scipy.odr.ODR class fails when delta0 parameter is set #18739
Comments
You're right, I was probably thinking of it being fully-expanded at the time. The C code has the full logic handling all of the cases and should be replicated over here. |
Thanks for the confirmation. I'm working on a project that needs to use that parameter, so I'd be interested in the guesstimated timescale for fixing it. If it is likely to be fixed soon, I'll work on other things. Otherwise, can you suggest any workarounds, other than calling |
You can manually apply the fix in gh-18741 to your copy. It might be some time before the next release cycle. |
Thanks for addressing this so quickly! I don't have experience with manual changes to a large external library like Scipy, so I f you could elaborate on how to do that or point me to any resources, I'd appreciate it. |
It's just a few lines in |
Thanks again. I can do that for now, but I'm aiming to distribute my code as a package, so it would be better to have a way to store the bug fix in my source directory until it appears in an official release. |
You can always subclass |
Perfect. Thanks again! |
Describe your issue.
It's possible that I've misunderstood how to use
scipy.odr
, and if that is the case, then perhaps this bug report can be repurposed to improve the documentation.The traceback indicates that
ODR._gen_work
expectsdata.we
to be 2D. But in this example,data.we
is 1D with shape (256,). (N.B.: In the traceback, I've replaced the path to my local virtual environment with***
.)As a workaround, I tried changing the line
to
but this also fails. The traceback for this error is below (also with the virtual environment path replaced by
***
), and indicates that thewe
array does not have the shape thatodr
expects.Reproducing Code Example
Error message
SciPy/NumPy/Python version and system information
The text was updated successfully, but these errors were encountered: