Registry / ai-ml / kdepy
library1.1.12pypypi✓ verified 80d ago

KDEpy is a Python library for kernel density estimation (KDE). It provides implementations of various KDE methods including naive, convolution, FFT, and tree-based approaches. Current version is 1.1.12. Release cadence is irregular, with updates primarily for compatibility and bug fixes.

pip install kdepy
INSTALL
IMPORT
SIG · KDEPY
K
kdepy
ai-mlpythonv1.1.12
Install
7.3s avg
Import
Disk
228MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.12 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.3s · import 0.000s · 225MB
228MB installed
● package 228MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FFTKDE
from KDEpy import FFTKDE
from KDEpy import KDE
NaiveKDE
from KDEpy import NaiveKDE
TreeKDE
from KDEpy import TreeKDE

Fit a kernel density estimate using FFT-based KDE with Improved Sheather-Jones bandwidth selection.

import numpy as np from KDEpy import FFTKDE # Generate sample data np.random.seed(123) data = np.random.normal(0, 1, size=100) # Fit KDE kde = FFTKDE(bw='ISJ') x, y = kde.fit(data).evaluate(1024) # Plot import matplotlib.pyplot as plt plt.plot(x, y) plt.show()
Debug
Known issues
gotchaThe import path uses mixed case: `from KDEpy import ...`. Lowercase `from kdepy import ...` will fail.
fix
Use uppercase KDE in the import statement.
affects: all
gotchaThe Bandwidth class is not exposed in the top-level namespace. Users may mistakenly attempt to import it directly from KDEpy.
fix
Use `from KDEpy.bandwidth import Bandwidth` or rely on automatic bandwidth selection via `bw` parameter.
affects: all
gotchaIn KDEpy, the default bandwidth selection method changed between versions. In v1.1.0+, the default for FFTKDE is 'ISJ' (Improved Sheather-Jones) instead of 'silverman'.
fix
Explicitly specify `bw='silverman'` if you need the old default.
affects: >=1.1.0
deprecatedThe `bw_method` keyword argument was deprecated in v1.0.0 in favor of `bw`.
fix
Use `bw` instead of `bw_method`.
affects: >=1.0.0
Upgrade
Version history
1.1.12latest on PyPI · released May 2, 2025
Audit
Dependencies
numpyrequiredCore numerical computations
scipyoptionalUsed for optional features like optimization
matplotliboptionalUsed for plotting examples
Agent activity
10 hits · last 30 days
node
8
Resources
kdepy — pip install kdepy · libregistry