@@ -1273,21 +1273,21 @@ def nanpercentile(
1273
1273
method : str, optional
1274
1274
This parameter specifies the method to use for estimating the
1275
1275
percentile. There are many different methods, some unique to NumPy.
1276
- See the notes for explanation. The options aligning with the R types
1277
- and the H&F paper are:
1278
-
1279
- * (H&F 1): 'inverted_cdf'
1280
- * (H&F 2): 'averaged_inverted_cdf'
1281
- * (H&F 3): 'closest_observation'
1282
- * (H&F 4): 'interpolated_inverted_cdf'
1283
- * (H&F 5): 'hazen'
1284
- * (H&F 6): 'weibull'
1285
- * (H&F 7): 'linear' (default)
1286
- * (H&F 8): 'median_unbiased'
1287
- * (H&F 9): 'normal_unbiased'
1288
-
1289
- Mainly for compatibility reasons, NumPy also supports the following
1290
- options which appear to be unique to NumPy :
1276
+ See the notes for explanation. The options sorted by their R type
1277
+ as summarized in the H&F paper [1]_ are:
6D40
1278
+
1279
+ 1. 'inverted_cdf'
1280
+ 2. 'averaged_inverted_cdf'
1281
+ 3. 'closest_observation'
1282
+ 4. 'interpolated_inverted_cdf'
1283
+ 5. 'hazen'
1284
+ 6. 'weibull'
1285
+ 7. 'linear' (default)
1286
+ 8. 'median_unbiased'
1287
+ 9. 'normal_unbiased'
1288
+
1289
+ The first three methods are discontiuous. NumPy further defines the
1290
+ following discontinuous variations of the default 'linear' (7.) option :
1291
1291
1292
1292
* 'lower'
1293
1293
* 'higher',
@@ -1365,6 +1365,12 @@ def nanpercentile(
1365
1365
array([7., 2.])
1366
1366
>>> assert not np.all(a==b)
1367
1367
1368
+ References
1369
+ ----------
1370
+ .. [1] R. J. Hyndman and Y. Fan,
1371
+ "Sample quantiles in statistical packages,"
1372
+ The American Statistician, 50(4), pp. 361-365, 1996
1373
+
1368
1374
"""
1369
1375
if interpolation is not None :
1370
1376
method = function_base ._check_interpolation_as_method (
@@ -1427,21 +1433,21 @@ def nanquantile(
1427
1433
method : str, optional
1428
1434
This parameter specifies the method to use for estimating the
1429
1435
quantile. There are many different methods, some unique to NumPy.
1430
- See the notes for explanation. The options aligning with the R types
1431
- and the H&F paper are:
1432
-
1433
- * (H&F 1): 'inverted_cdf'
1434
- * (H&F 2): 'averaged_inverted_cdf'
1435
- * (H&F 3): 'closest_observation'
1436
- * (H&F 4): 'interpolated_inverted_cdf'
1437
- * (H&F 5): 'hazen'
1438
- * (H&F 6): 'weibull'
1439
- * (H&F 7): 'linear' (default)
1440
- * (H&F 8): 'median_unbiased'
1441
- * (H&F 9): 'normal_unbiased'
1442
-
1443
- Mainly for compatibility reasons, NumPy also supports the following
1444
- options which appear to be unique to NumPy :
1436
+ See the notes for explanation. The options sorted by their R type
1437
+ as summarized in the H&F paper [1]_ are:
1438
+
1439
+ 1. 'inverted_cdf'
1440
+ 2. 'averaged_inverted_cdf'
1441
+ 3. 'closest_observation'
1442
+ 4. 'interpolated_inverted_cdf'
1443
+ 5. 'hazen'
1444
+ 6. 'weibull'
1445
+ 7. 'linear' (default)
1446
+ 8. 'median_unbiased'
1447
+ 9. 'normal_unbiased'
1448
+
1449
+ The first three methods are discontiuous. NumPy further defines the
1450
+ following discontinuous variations of the default 'linear' (7.) option :
1445
1451
1446
1452
* 'lower'
1447
1453
* 'higher',
@@ -1518,6 +1524,12 @@ def nanquantile(
1518
1524
array([7., 2.])
1519
1525
>>> assert not np.all(a==b)
1520
1526
1527
+ References
1528
+ ----------
1529
+ .. [1] R. J. Hyndman and Y. Fan,
1530
+ "Sample quantiles in statistical packages,"
1531
+ The American Statistician, 50(4), pp. 361-365, 1996
1532
+
1521
1533
"""
1522
1534
if interpolation is not None :
1523
1535
method = function_base ._check_interpolation_as_method (
0 commit comments