@@ -831,10 +831,10 @@ cdef class RandomState:
831
831
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
832
832
``m * n * k`` samples are drawn. Default is None, in which case a
833
833
single value is returned.
834
- dtype : dtype, optional
835
- Desired dtype of the result. All dtypes are determined by their
836
- name, either 'float64' or 'float32'. The default value is
837
- 'float64 '.
834
+ dtype : {str, dtype} , optional
835
+ Desired dtype of the result, either 'd' (or 'float64') or 'f'
836
+ ( or 'float32'). All dtypes are determined by their name. The
837
+ default value is 'd '.
838
838
out : ndarray, optional
839
839
Alternative output array in which to place the result. If size is not None,
840
840
it must have the same shape as the provided size and must match the type of
@@ -958,7 +958,7 @@ cdef class RandomState:
958
958
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
959
959
``m * n * k`` samples are drawn. Default is None, in which case a
960
960
single value is returned.
961
- dtype : dtype, optional
961
+ dtype : {str, dtype} , optional
962
962
Desired dtype of the result. All dtypes are determined by their
963
963
name, i.e., 'int64', 'int', etc, so byteorder is not available
964
964
and a specific precision may have different C types depending
@@ -1362,7 +1362,7 @@ cdef class RandomState:
1362
1362
1363
1363
def rand (self , * args , dtype = np .float64 ):
1364
1364
"""
1365
- rand(d0, d1, ..., dn, dtype='float64 ')
1365
+ rand(d0, d1, ..., dn, dtype='d ')
1366
1366
1367
1367
Random values in a given shape.
1368
1368
@@ -1375,10 +1375,10 @@ cdef class RandomState:
1375
1375
d0, d1, ..., dn : int, optional
1376
1376
The dimensions of the returned array, should all be positive.
1377
1377
If no argument is given a single Python float is returned.
1378
- dtype : dtype, optional
1379
- Desired dtype of the result. All dtypes are determined by their
1380
- name, either 'float64' or 'float32'. The default value is
1381
- 'float64 '.
1378
+ dtype : {str, dtype} , optional
1379
+ Desired dtype of the result, either 'd' (or 'float64') or 'f'
1380
+ ( or 'float32'). All dtypes are determined by their name. The
1381
+ default value is 'd '.
1382
1382
1383
1383
Returns
1384
1384
-------
@@ -1410,7 +1410,7 @@ cdef class RandomState:
1410
1410
1411
1411
def randn (self , * args , method = __normal_method , dtype = np .float64 ):
1412
1412
"""
1413
- randn(d0, d1, ..., dn, method='bm', dtype='float64 ')
1413
+ randn(d0, d1, ..., dn, method='bm', dtype='d ')
1414
1414
1415
1415
Return a sample (or samples) from the "standard normal" distribution.
1416
1416
@@ -1431,12 +1431,13 @@ cdef class RandomState:
1431
1431
The dimensions of the returned array, should be all positive.
1432
1432
If no argument is given a single Python float is returned.
1433
1433
method : str, optional
1434
- Either 'bm' or 'zig'. 'bm' uses the default Box-Muller transformations
1435
- method. 'zig' uses the much faster Ziggurat method of Marsaglia and Tsang.
1436
- dtype : dtype, optional
1437
- Desired dtype of the result. All dtypes are determined by their
1438
- name, either 'float64' or 'float32'. The default value is
1439
- 'float64'.
1434
+ Either 'bm' or 'zig'. 'bm' uses the default Box-Muller
1435
+ transformations method. 'zig' uses the much faster Ziggurat
1436
+ method of Marsaglia and Tsang.
1437
+ dtype : {str, dtype}, optional
1438
+ Desired dtype of the result, either 'd' (or 'float64') or 'f'
1439
+ (or 'float32'). All dtypes are determined by their name. The
1440
+ default value is 'd'.
1440
1441
1441
1442
Returns
1442
1443
-------
@@ -1582,10 +1583,10 @@ cdef class RandomState:
1582
1583
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
1583
1584
``m * n * k`` samples are drawn. Default is None, in which case a
1584
1585
single value is returned.
1585
- dtype : dtype, optional
1586
- Desired dtype of the result. All dtypes are determined by their
1587
- name, either 'float64' or 'float32'. The default value is
1588
- 'float64 '.
1586
+ dtype : {str, dtype} , optional
1587
+ Desired dtype of the result, either 'd' (or 'float64') or 'f'
1588
+ ( or 'float32'). All dtypes are determined by their name. The
1589
+ default value is 'd '.
1589
1590
method : str, optional
1590
1591
Either 'bm' or 'zig'. 'bm' uses the default Box-Muller transformations
1591
1592
method. 'zig' uses the much faster Ziggurat method of Marsaglia and Tsang.
@@ -2021,7 +2022,7 @@ cdef class RandomState:
2021
2022
2022
2023
def standard_exponential (self , size = None , dtype = np .float64 , method = u'inv' , out = None ):
2023
2024
"""
2024
- standard_exponential(size=None, dtype=np.float64 , method='inv', out=None)
2025
+ standard_exponential(size=None, dtype='d' , method='inv', out=None)
2025
2026
2026
2027
Draw samples from the standard exponential distribution.
2027
2028
@@ -2035,16 +2036,16 @@ cdef class RandomState:
2035
2036
``m * n * k`` samples are drawn. Default is None, in which case a
2036
2037
single value is returned.
2037
2038
dtype : dtype, optional
2038
- Desired dtype of the result. All dtypes are determined by their
2039
- name, either 'float64' or 'float32'. The default value is
2040
- 'float64 '.
2039
+ Desired dtype of the result, either 'd' (or 'float64') or 'f'
2040
+ ( or 'float32'). All dtypes are determined by their name. The
2041
+ default value is 'd '.
2041
2042
method : str, optional
2042
2043
Either 'inv' or 'zig'. 'inv' uses the default inverse CDF method.
2043
2044
'zig' uses the much faster Ziggurat method of Marsaglia and Tsang.
2044
2045
out : ndarray, optional
2045
- Alternative output array in which to place the result. If size is not None,
2046
- it must have the same shape as the provided size and must match the type of
2047
- the output values.
2046
+ Alternative output array in which to place the result. If size is
2047
+ not None, it must have the same shape as the provided size and must
2048
+ match the type of the output values.
2048
2049
2049
2050
Returns
2050
2051
-------
@@ -2085,7 +2086,7 @@ cdef class RandomState:
2085
2086
def standard_gamma (self , shape , size = None , dtype = np .float64 , method = 'inv' ,
2086
2087
out = None ):
2087
2088
"""
2088
- standard_gamma(shape, size=None, dtype=np.float64 , method='inv', out=None)
2089
+ standard_gamma(shape, size=None, dtype='d' , method='inv', out=None)
2089
2090
2090
2091
Draw samples from a standard Gamma distribution.
2091
2092
@@ -2101,9 +2102,10 @@ cdef class RandomState:
2101
2102
``m * n * k`` samples are drawn. If size is ``None`` (default),
2102
2103
a single value is returned if ``shape`` is a scalar. Otherwise,
2103
2104
``np.array(shape).size`` samples are drawn.
2104
- dtype : dtype, optional
2105
- Desired dtype of the result, either ``np.float64`` (default)
2106
- or ``np.float32``.
2105
+ dtype : {str, dtype}, optional
2106
+ Desired dtype of the result, either 'd' (or 'float64') or 'f'
2107
+ (or 'float32'). All dtypes are determined by their name. The
2108
+ default value is 'd'.
2107
2109
method : str, optional
2108
2110
Either 'inv' or 'zig'. 'inv' uses the default inverse CDF method.
2109
2111
'zig' uses the much faster Ziggurat method of Marsaglia and Tsang.
0 commit comments