tommyod/KDEpy

FutureWarning

Open

#162 opened on Feb 21, 2024

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Jupyter Notebook (104 forks)auto 404
good first issuehelp wanted

Repository metrics

Stars
 (647 stars)
PR merge metrics
 (PR metrics pending)

Description

Hello everyone,

I am getting the following FutureWarning:

...lib\site-packages\scipy\optimize\_zeros_py.py:809: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
r = _zeros._brentq(f, a, b, xtol, rtol, maxiter, args, full_output, disp)

A minimal example to reproduce the behaviour:

from KDEpy import FFTKDE
import warnings
warnings.filterwarnings("always")


customer_ages = [40, 56, 20, 35, 27, 24, 29, 37, 39, 46]
FFTKDE(kernel="gaussian", bw=1.0).fit(customer_ages).evaluate([0,10,20,30,40,50,60])

I am using the version 1.1.8 of KDEpy and 1.26.4 of numpy.

Contributor guide