JuliaMath / JuliaMath/AbstractFFTs.jl
Converting scale array in adjoint plan application fails for subarrays
Open
- Dominant language
- Julia
- Stars
- 134
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
The code `convert(typeof(x), scale)` fails when `x` is a subarray, e.g. in line
https://github.com/JuliaMath/AbstractFFTs.jl/blob/1cc9ca01f9f1968face7557c372f7a90ca26f693/src/definitions.jl#L641
It would also fail if `x` is e.g. a `Zygote.OneElement`, e.g. in the context of the plan reverse rule.
---
Jax's implementation for reference: https://github.com/google/jax/blob/c3aa3a4c312826cdfb0d617e30f0467c18ab4564/jax/_src/lax/fft.py#L211. Not terribly useful here because there they have no problems with generic broadcasting array construction
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.