Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Bugs in af.approx1()

Open
#135 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start by running the linked reproduction code and examining af.approx1 with af.INTERP.CUBIC and af.INTERP.CUBIC_SPLINE. Compare the observed convergence rates and error floor with SciPy's interp1d; done means identifying and correcting the interpolation behavior so the expected convergence and accuracy are restored.

Written by the indexing model from the issue text.

Description

Convergence checks performed on the ArrayFire routines for interpolation seem to indicate a few mistakes:

The following plot is generated using af.INTERP.CUBIC
download 9

The order of convergence comes out to be image, while the expected convergence rate is image. I checked with af.INTERP.CUBIC_SPLINE as well. Even in that case the order of convergence comes out to be image

download 8

Another issue is the fact that the error doesn't drop below 1e-7. The SciPy interpolation function interp1d using cubic interpolation gives this:

download 19

For your reference - this is the code I'd used to generate the plots.

Also regarding issue #130 - I've realised that the mistake was on my part. I should have added the off-set in the indexing to the normalized interpolant points.

Dominant language
Python
Stars
422
Forks
63
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from arrayfire/arrayfire-python

All issues in arrayfire/arrayfire-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.