Skip to content
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

Runtime error when calling np.pad with Numpy < 1.17 #15

Closed
plasota opened this issue Mar 18, 2020 · 2 comments · Fixed by #16
Closed

Runtime error when calling np.pad with Numpy < 1.17 #15

plasota opened this issue Mar 18, 2020 · 2 comments · Fixed by #16
Labels

Comments

@plasota
Copy link

plasota commented Mar 18, 2020

Great job on the package!

I got a runtime error from Numpy 1.16 when calling the np.pad function from this line

File "/home/pem/anaconda3/lib/python3.7/site-packages/csaps/_sspumv.py", line 282, in _make_spline
d1 = np.diff(np.pad(u, pad_width), axis=0) / dx
TypeError: pad() missing 1 required positional argument: 'mode'

Turns out that prior to Numpy 1.17, np.pad doesn't provide a default value for the mode parameter. Upgrading Numpy fixed the problem.

It would be helpful if you bump the required Numpy version to 1.17 or higher in your setup.py or provide a default value wherever you call np.pad if you'd like to maintain a wider range of supported Numpy versions.

@espdev espdev added the bug label Mar 19, 2020
@espdev
Copy link
Owner

espdev commented Mar 19, 2020

Thanks for the issue report!
I will fix call np.pad function soon.

espdev added a commit that referenced this issue Mar 19, 2020
* (#15) fix call numpy.pad function for numpy==1.16
* bump version to 0.10.1
@espdev
Copy link
Owner

espdev commented Mar 19, 2020

@plasota

The issue has been fixed in v0.10.1 (it is already on PyPI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants