numba-scipy icon indicating copy to clipboard operation
numba-scipy copied to clipboard

Using interpolate.splev

Open haimivan opened this issue 4 years ago • 2 comments

Hi,

when using scipy.interpolate.splev, I get the following error:

Unknown attribute 'splev' of type Module(<module 'scipy.interpolate' from '/home/user/venv/numba/lib/python3.6/site-packages/scipy/interpolate/__init__.py'>)

Is it possible to integrate splev within numba-scipy?

Or does this error message mean I do not use numba-scipy correctly?

Thanks in advance!

haimivan avatar Jan 08 '20 07:01 haimivan

Thanks for the report. The error message means that it has not been implemented.

Is it possible to integrate splev within numba-scipy?

I would imagine so, the use of Numba's extension API @overload decorator is strongly recommended for this task. A guide to using @overload is here and API documentation is here.

It may be useful to take a look at examples of pull requests adding support for a NumPy function that have already been done if guidance is needed... here's a couple:

  • np.roll: https://github.com/numba/numba/pull/3563/files
  • np.roots: https://github.com/numba/numba/pull/2135/files

There's also a contributing guide here: https://numba-scipy.readthedocs.io/en/latest/developer/contributing.html

stuartarchibald avatar Jan 08 '20 08:01 stuartarchibald

Thanks!

haimivan avatar Jan 08 '20 19:01 haimivan