@@ -185,29 +185,20 @@ def bytes(length):
185
185
186
186
Return random bytes.
187
187
188
- Parameters
189
- ----------
190
- length : int
191
- Number of random bytes.
188
+ For full documentation refer to :obj:`numpy.random.bytes`.
192
189
193
- Returns
194
- -------
195
- out : str
196
- String of length `length`.
197
-
198
- Examples
199
- --------
200
- >>> dpnp.random.bytes(10)
201
- ' eh\\ x85\\ x022SZ\\ xbf\\ xa4' #random
190
+ Notes
191
+ -----
192
+ The function uses `numpy.random.bytes` on the backend and will be
193
+ executed on fallback backend.
202
194
203
195
"""
204
196
205
197
return call_origin (numpy .random .bytes , length )
206
198
207
199
208
200
def chisquare (df , size = None ):
209
- """
210
- chisquare(df, size=None)
201
+ """Chi-square distribution
211
202
212
203
Draw samples from a chi-square distribution.
213
204
@@ -1309,21 +1300,25 @@ def seed(seed=None):
1309
1300
"""
1310
1301
Reseed a legacy philox4x32x10 random number generator engine.
1311
1302
1312
- Parameters
1313
- ----------
1314
- seed : {None, int}, optional
1303
+ Limitations
1304
+ -----------
1305
+ Parameter ``seed`` is supported as a scalar.
1306
+ Otherwise, the function will use :obj:`numpy.random.seed` on the backend
1307
+ and will be executed on fallback backend.
1315
1308
1316
1309
"""
1317
1310
1318
1311
if not use_origin_backend (seed ):
1312
+ # TODO:
1313
+ # array_like of ints for `seed`
1314
+ if seed is None :
1315
+ seed = 1
1319
1316
if not isinstance (seed , int ):
1320
1317
pass
1321
1318
elif seed < 0 :
1322
1319
pass
1323
1320
else :
1324
- if seed is None :
1325
- seed = 1
1326
- dpnp_srand (seed )
1321
+ return dpnp_srand (seed )
1327
1322
1328
1323
return call_origin (numpy .random .seed , seed )
1329
1324
@@ -1335,16 +1330,9 @@ def standard_cauchy(size=None):
1335
1330
1336
1331
Also known as the Lorentz distribution.
1337
1332
1338
- Parameters
1339
- ----------
1340
- size : int, optional
1341
- Output shape. If the given shape is, e.g., ``(m, n, k)``, then
1342
- ``m * n * k`` samples are drawn.
1343
-
1344
- Returns
1345
- -------
1346
- samples : dparray
1347
- The drawn samples.
1333
+ Limitations
1334
+ -----------
1335
+ Output array data type is :obj:`dpnp.float64`.
1348
1336
1349
1337
Examples
1350
1338
--------
@@ -1371,17 +1359,9 @@ def standard_exponential(size=None):
1371
1359
`standard_exponential` is identical to the exponential distribution
1372
1360
with a scale parameter of 1.
1373
1361
1374
- Parameters
1375
- ----------
1376
- size : int or tuple of ints, optional
1377
- Output shape. If the given shape is, e.g., ``(m, n, k)``, then
1378
- ``m * n * k`` samples are drawn. Default is None, in which case a
1379
- single value is returned.
1380
-
1381
- Returns
1382
- -------
1383
- out : dparray
1384
- Drawn samples.
1362
+ Limitations
1363
+ -----------
1364
+ Output array data type is :obj:`dpnp.float64`.
1385
1365
1386
1366
Examples
1387
1367
--------
@@ -1436,18 +1416,16 @@ def standard_normal(size=None):
1436
1416
1437
1417
Draw samples from a standard Normal distribution (mean=0, stdev=1).
1438
1418
1439
- Parameters
1440
- ----------
1441
- size : int, optional
1442
- Output shape. If the given shape is, e.g., ``(m, n, k)``, then
1443
- ``m * n * k`` samples are drawn. Default is None, in which case a
1444
- single value is returned.
1419
+ For full documentation refer to :obj:`numpy.random.standard_normal`.
1445
1420
1446
- Returns
1447
- -------
1448
- out : float or ndarray
1449
- A floating-point array of shape ``size`` of drawn samples, or a
1450
- single sample if ``size`` was not specified.
1421
+ Limitations
1422
+ -----------
1423
+ Output array data type is :obj:`dpnp.float64`.
1424
+
1425
+ Examples
1426
+ --------
1427
+ Draw samples from the distribution:
1428
+ >>> s = dpnp.random.standard_normal(1000)
1451
1429
1452
1430
"""
1453
1431
0 commit comments