We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11a239d commit d5f260bCopy full SHA for d5f260b
pandas/tests/plotting/test_series.py
@@ -538,6 +538,23 @@ def test_kde_kwargs(self, ts, bw_method, ind):
538
pytest.importorskip("scipy")
539
_check_plot_works(ts.plot.kde, bw_method=bw_method, ind=ind)
540
541
+ @pytest.mark.parametrize(
542
+ "bw_method, ind, weights",
543
+ [
544
+ ["scott", 20, None],
545
+ [None, 20, None],
546
+ [None, np.int_(20), None],
547
+ [0.5, np.linspace(-100, 100, 20), None],
548
+ ["scott", 40, np.linspace(0.0, 2.0, 50)],
549
+ ],
550
+ )
551
+ def test_kde_kwargs_weights(self, bw_method, ind, weights):
552
+ # GH59337
553
+ pytest.importorskip("scipy")
554
+ s = Series(np.random.default_rng(2).uniform(size=50))
555
+ # weights = np.linspace(0.0, 2.0, 50)
556
+ _check_plot_works(s.plot.kde, bw_method=bw_method, ind=ind, weights=weights)
557
+
558
def test_density_kwargs(self, ts):
559
560
sample_points = np.linspace(-100, 100, 20)
0 commit comments