Skip to content

Commit 99bfe12

Browse files
committed
Fixes pydata#5898
1 parent 7f39cc0 commit 99bfe12

File tree

2 files changed

+153
-0
lines changed

2 files changed

+153
-0
lines changed

xarray/core/_reductions.py

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,10 @@ def mean(
496496
Data variables:
497497
da float64 nan
498498
499+
Notes
500+
-----
501+
Non-numeric variables will be removed prior to reducing.
502+
499503
See Also
500504
--------
501505
numpy.mean
@@ -597,6 +601,10 @@ def prod(
597601
Data variables:
598602
da float64 12.0
599603
604+
Notes
605+
-----
606+
Non-numeric variables will be removed prior to reducing.
607+
600608
See Also
601609
--------
602610
numpy.prod
@@ -699,6 +707,10 @@ def sum(
699707
Data variables:
700708
da float64 9.0
701709
710+
Notes
711+
-----
712+
Non-numeric variables will be removed prior to reducing.
713+
702714
See Also
703715
--------
704716
numpy.sum
@@ -798,6 +810,10 @@ def std(
798810
Data variables:
799811
da float64 0.8367
800812
813+
Notes
814+
-----
815+
Non-numeric variables will be removed prior to reducing.
816+
801817
See Also
802818
--------
803819
numpy.std
@@ -897,6 +913,10 @@ def var(
897913
Data variables:
898914
da float64 0.7
899915
916+
Notes
917+
-----
918+
Non-numeric variables will be removed prior to reducing.
919+
900920
See Also
901921
--------
902922
numpy.var
@@ -984,6 +1004,10 @@ def median(
9841004
Data variables:
9851005
da float64 nan
9861006
1007+
Notes
1008+
-----
1009+
Non-numeric variables will be removed prior to reducing.
1010+
9871011
See Also
9881012
--------
9891013
numpy.median
@@ -1418,6 +1442,10 @@ def mean(
14181442
<xarray.DataArray ()>
14191443
array(nan)
14201444
1445+
Notes
1446+
-----
1447+
Non-numeric variables will be removed prior to reducing.
1448+
14211449
See Also
14221450
--------
14231451
numpy.mean
@@ -1509,6 +1537,10 @@ def prod(
15091537
<xarray.DataArray ()>
15101538
array(12.)
15111539
1540+
Notes
1541+
-----
1542+
Non-numeric variables will be removed prior to reducing.
1543+
15121544
See Also
15131545
--------
15141546
numpy.prod
@@ -1601,6 +1633,10 @@ def sum(
16011633
<xarray.DataArray ()>
16021634
array(9.)
16031635
1636+
Notes
1637+
-----
1638+
Non-numeric variables will be removed prior to reducing.
1639+
16041640
See Also
16051641
--------
16061642
numpy.sum
@@ -1690,6 +1726,10 @@ def std(
16901726
<xarray.DataArray ()>
16911727
array(0.83666003)
16921728
1729+
Notes
1730+
-----
1731+
Non-numeric variables will be removed prior to reducing.
1732+
16931733
See Also
16941734
--------
16951735
numpy.std
@@ -1779,6 +1819,10 @@ def var(
17791819
<xarray.DataArray ()>
17801820
array(0.7)
17811821
1822+
Notes
1823+
-----
1824+
Non-numeric variables will be removed prior to reducing.
1825+
17821826
See Also
17831827
--------
17841828
numpy.var
@@ -1858,6 +1902,10 @@ def median(
18581902
<xarray.DataArray ()>
18591903
array(nan)
18601904
1905+
Notes
1906+
-----
1907+
Non-numeric variables will be removed prior to reducing.
1908+
18611909
See Also
18621910
--------
18631911
numpy.median
@@ -2350,6 +2398,10 @@ def mean(
23502398
Data variables:
23512399
da (labels) float64 nan 2.0 2.0
23522400
2401+
Notes
2402+
-----
2403+
Non-numeric variables will be removed prior to reducing.
2404+
23532405
See Also
23542406
--------
23552407
numpy.mean
@@ -2457,6 +2509,10 @@ def prod(
24572509
Data variables:
24582510
da (labels) float64 nan 4.0 3.0
24592511
2512+
Notes
2513+
-----
2514+
Non-numeric variables will be removed prior to reducing.
2515+
24602516
See Also
24612517
--------
24622518
numpy.prod
@@ -2565,6 +2621,10 @@ def sum(
25652621
Data variables:
25662622
da (labels) float64 nan 4.0 4.0
25672623
2624+
Notes
2625+
-----
2626+
Non-numeric variables will be removed prior to reducing.
2627+
25682628
See Also
25692629
--------
25702630
numpy.sum
@@ -2670,6 +2730,10 @@ def std(
26702730
Data variables:
26712731
da (labels) float64 nan 0.0 1.414
26722732
2733+
Notes
2734+
-----
2735+
Non-numeric variables will be removed prior to reducing.
2736+
26732737
See Also
26742738
--------
26752739
numpy.std
@@ -2775,6 +2839,10 @@ def var(
27752839
Data variables:
27762840
da (labels) float64 nan 0.0 2.0
27772841
2842+
Notes
2843+
-----
2844+
Non-numeric variables will be removed prior to reducing.
2845+
27782846
See Also
27792847
--------
27802848
numpy.var
@@ -2866,6 +2934,10 @@ def median(
28662934
Data variables:
28672935
da (labels) float64 nan 2.0 2.0
28682936
2937+
Notes
2938+
-----
2939+
Non-numeric variables will be removed prior to reducing.
2940+
28692941
See Also
28702942
--------
28712943
numpy.median
@@ -3359,6 +3431,10 @@ def mean(
33593431
Data variables:
33603432
da (time) float64 1.0 2.0 nan
33613433
3434+
Notes
3435+
-----
3436+
Non-numeric variables will be removed prior to reducing.
3437+
33623438
See Also
33633439
--------
33643440
numpy.mean
@@ -3466,6 +3542,10 @@ def prod(
34663542
Data variables:
34673543
da (time) float64 nan 6.0 nan
34683544
3545+
Notes
3546+
-----
3547+
Non-numeric variables will be removed prior to reducing.
3548+
34693549
See Also
34703550
--------
34713551
numpy.prod
@@ -3574,6 +3654,10 @@ def sum(
35743654
Data variables:
35753655
da (time) float64 nan 6.0 nan
35763656
3657+
Notes
3658+
-----
3659+
Non-numeric variables will be removed prior to reducing.
3660+
35773661
See Also
35783662
--------
35793663
numpy.sum
@@ -3679,6 +3763,10 @@ def std(
36793763
Data variables:
36803764
da (time) float64 nan 1.0 nan
36813765
3766+
Notes
3767+
-----
3768+
Non-numeric variables will be removed prior to reducing.
3769+
36823770
See Also
36833771
--------
36843772
numpy.std
@@ -3784,6 +3872,10 @@ def var(
37843872
Data variables:
37853873
da (time) float64 nan 1.0 nan
37863874
3875+
Notes
3876+
-----
3877+
Non-numeric variables will be removed prior to reducing.
3878+
37873879
See Also
37883880
--------
37893881
numpy.var
@@ -3875,6 +3967,10 @@ def median(
38753967
Data variables:
38763968
da (time) float64 1.0 2.0 nan
38773969
3970+
Notes
3971+
-----
3972+
Non-numeric variables will be removed prior to reducing.
3973+
38783974
See Also
38793975
--------
38803976
numpy.median
@@ -4327,6 +4423,10 @@ def mean(
43274423
Coordinates:
43284424
* labels (labels) object 'a' 'b' 'c'
43294425
4426+
Notes
4427+
-----
4428+
Non-numeric variables will be removed prior to reducing.
4429+
43304430
See Also
43314431
--------
43324432
numpy.mean
@@ -4424,6 +4524,10 @@ def prod(
44244524
Coordinates:
44254525
* labels (labels) object 'a' 'b' 'c'
44264526
4527+
Notes
4528+
-----
4529+
Non-numeric variables will be removed prior to reducing.
4530+
44274531
See Also
44284532
--------
44294533
numpy.prod
@@ -4522,6 +4626,10 @@ def sum(
45224626
Coordinates:
45234627
* labels (labels) object 'a' 'b' 'c'
45244628
4629+
Notes
4630+
-----
4631+
Non-numeric variables will be removed prior to reducing.
4632+
45254633
See Also
45264634
--------
45274635
numpy.sum
@@ -4617,6 +4725,10 @@ def std(
46174725
Coordinates:
46184726
* labels (labels) object 'a' 'b' 'c'
46194727
4728+
Notes
4729+
-----
4730+
Non-numeric variables will be removed prior to reducing.
4731+
46204732
See Also
46214733
--------
46224734
numpy.std
@@ -4712,6 +4824,10 @@ def var(
47124824
Coordinates:
47134825
* labels (labels) object 'a' 'b' 'c'
47144826
4827+
Notes
4828+
-----
4829+
Non-numeric variables will be removed prior to reducing.
4830+
47154831
See Also
47164832
--------
47174833
numpy.var
@@ -4795,6 +4911,10 @@ def median(
47954911
Coordinates:
47964912
* labels (labels) object 'a' 'b' 'c'
47974913
4914+
Notes
4915+
-----
4916+
Non-numeric variables will be removed prior to reducing.
4917+
47984918
See Also
47994919
--------
48004920
numpy.median
@@ -5246,6 +5366,10 @@ def mean(
52465366
Coordinates:
52475367
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
52485368
5369+
Notes
5370+
-----
5371+
Non-numeric variables will be removed prior to reducing.
5372+
52495373
See Also
52505374
--------
52515375
numpy.mean
@@ -5343,6 +5467,10 @@ def prod(
53435467
Coordinates:
53445468
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
53455469
5470+
Notes
5471+
-----
5472+
Non-numeric variables will be removed prior to reducing.
5473+
53465474
See Also
53475475
--------
53485476
numpy.prod
@@ -5441,6 +5569,10 @@ def sum(
54415569
Coordinates:
54425570
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
54435571
5572+
Notes
5573+
-----
5574+
Non-numeric variables will be removed prior to reducing.
5575+
54445576
See Also
54455577
--------
54465578
numpy.sum
@@ -5536,6 +5668,10 @@ def std(
55365668
Coordinates:
55375669
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
55385670
5671+
Notes
5672+
-----
5673+
Non-numeric variables will be removed prior to reducing.
5674+
55395675
See Also
55405676
--------
55415677
numpy.std
@@ -5631,6 +5767,10 @@ def var(
56315767
Coordinates:
56325768
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
56335769
5770+
Notes
5771+
-----
5772+
Non-numeric variables will be removed prior to reducing.
5773+
56345774
See Also
56355775
--------
56365776
numpy.var
@@ -5714,6 +5854,10 @@ def median(
57145854
Coordinates:
57155855
* time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31
57165856
5857+
Notes
5858+
-----
5859+
Non-numeric variables will be removed prior to reducing.
5860+
57175861
See Also
57185862
--------
57195863
numpy.median

0 commit comments

Comments
 (0)