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
ENH: integrate: cumulative_simpson can support complex dtypes with small change #20553
Comments
cc @nprav |
Typically, when the documentation doesn't specifically mention complex dtypes, it was developed with only real dtypes in mind. For instance, @TheIdealis you're welcome to submit a PR. In addition to the adjustment you mentioned, please:
|
@mdhaber I'd like to do it, but I rarely ever did a PR so it might take some days to find the time for it. Just one small question. The documentation of e.g. |
Yes, that's what I mean by "consider cumulative_trapezoid, simpson, trapezoid, and other similar functions that can easily support complex y". I think we should ensure that similar functions have similar capabilities, and if we intend to provide those capabilities, they should be documented. |
Describe your issue.
If I use
cumulative_simpson
with a complex valued array, the imaginary part is discarded in_cumulatively_sum_simpson_integrals
. The problem can be fixed easily by changingto
Reproducing Code Example
Error message
SciPy/NumPy/Python version and system information
cython version: 3.0.10 numpy version: 1.26.4 scipy version: 1.13.0 host: cpu: x86_64 endian: little family: x86_64 system: linux Python Information: version: '3.10'
The text was updated successfully, but these errors were encountered: