https://github.com/python/cpython/commit/5afcd82089b6b1a6cf62b41a428cbe818b867364
commit: 5afcd82089b6b1a6cf62b41a428cbe818b867364
branch: main
author: Raymond Hettinger <[email protected]>
committer: rhettinger <[email protected]>
date: 2026-09-20T23:36:33-05:00
summary:
gh-154942: Document the kde() data cache logic. (gh-157725)
files:
M Doc/library/statistics.rst
diff --git a/Doc/library/statistics.rst b/Doc/library/statistics.rst
index dba0e26787d951..9ff30211ebcf15 100644
--- a/Doc/library/statistics.rst
+++ b/Doc/library/statistics.rst
@@ -306,6 +306,11 @@ However, for reading convenience, most of the examples
show sorted sequences.
.. image:: kde_example.png
:alt: Scatter plot of the estimated probability density function.
+ Because the returned ``f_hat`` function is typically called many times,
+ it caches the *data* for performance. To support dynamic datasets, this
+ cache automatically refreshes whenever the length of the *data* changes.
+ This allows new samples to be added as they become available.
+
.. versionadded:: 3.13
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]