arrayfire / arrayfire/arrayfire
[BUG] approx1 and approx2 produce suspect values in last bin
- Dominant language
- C++
- Stars
- 4.9k
- Forks
- 555
- Avg merge
- 1h 24m
- Merged PRs (30d)
- 1
Description
approx1 and approx2 cubic spline interpolation methods produce suspect values in the last bin at the boundary.
Description
===========
* Used official installers
* Occurs on all backends
* Partial workaround is just using higher resolution so that boundary regions are small
* Bug is reliably reproducible
* Expected output to match scipy's RectBivariateSpline method, which wraps fitpack
* No error output
Example interpolating on cos(x) with comparison to scipy:

Reproducible Code and/or Steps
------------------------------
* Any use of approx1 or approx2 with cubic spline interpolation type
System Information
------------------
Tested with AF version 3.7.2 on Mac & 3.8.1 on Ubuntu 20.04, both via the Rust bindings.
Info from Mac for convenience:
```
Available backends: [OPENCL, CPU]
Active backend: CPU
Number of available devices: 1
Device number: 0
Device info: ("Intel", "CPU", "AppleClang 10.0.0.10001044", "0.0")
```
Checklist
---------
- [x] Using the latest available ArrayFire release
- [x] GPU drivers are up to date
Contributor guide
Assessment
This issue has not been assessed yet.