From 627625bffd47536943ef88d1b4561e960cd22889 Mon Sep 17 00:00:00 2001 From: Nicolas Pinchaud Date: Fri, 5 Aug 2022 21:43:42 +0200 Subject: [PATCH 1/2] Fix doc of `windowed_variance` to match implementation --- tensorflow_probability/python/stats/sample_stats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow_probability/python/stats/sample_stats.py b/tensorflow_probability/python/stats/sample_stats.py index 1c9e82166f..1213c94e12 100644 --- a/tensorflow_probability/python/stats/sample_stats.py +++ b/tensorflow_probability/python/stats/sample_stats.py @@ -712,7 +712,7 @@ def windowed_variance( Computes variances among data in the Tensor `x` along the given windows: - result[i] = variance(x[low_indices[i]:high_indices[i]+1]) + result[i] = variance(x[low_indices[i]:high_indices[i]]) accurately and efficiently. To wit, if K is the size of `low_indices` and `high_indices`, and `N` is the size of `x` along From 1811efbab76c9760eb553e2837f16b949b69e955 Mon Sep 17 00:00:00 2001 From: Nicolas Pinchaud Date: Sun, 7 Aug 2022 10:14:30 +0200 Subject: [PATCH 2/2] Fix doc of `windowed_mean` to match implementation --- tensorflow_probability/python/stats/sample_stats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow_probability/python/stats/sample_stats.py b/tensorflow_probability/python/stats/sample_stats.py index 1213c94e12..2b778b8fa3 100644 --- a/tensorflow_probability/python/stats/sample_stats.py +++ b/tensorflow_probability/python/stats/sample_stats.py @@ -829,7 +829,7 @@ def windowed_mean( Computes means among data in the Tensor `x` along the given windows: - result[i] = mean(x[low_indices[i]:high_indices[i]+1]) + result[i] = mean(x[low_indices[i]:high_indices[i]]) efficiently. To wit, if K is the size of `low_indices` and `high_indices`, and `N` is the size of `x` along the given `axis`,