Skip to content

Commit ef331fa

Browse files
committed
Say that array parameters may be smaller than the result in the docstrings
1 parent f287c63 commit ef331fa

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎dpnp/random/_bit_generator.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ def _fill(self, kernel, params, result):
222222
with the distribution parameters `params`.
223223
224224
Each parameter is either a Python scalar or a C-contiguous array of
225-
the size of `result` and of the data type the kernel expects for it.
225+
the data type the kernel expects for it, whose size divides the size
226+
of `result`. A smaller array repeats along `result`, which the kernel
227+
reads cyclically.
226228
227229
"""
228230

‎dpnp/random/_generator.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,11 @@ def _sample(
377377
378378
`params` are the user's distribution parameters, which set the output
379379
shape along with `size`. `kernel_params` are the parameters passed to
380-
the kernel, `params` by default, of data type `dtype`. Every kernel
381-
parameter that is an array is broadcast to the output shape.
380+
the kernel, `params` by default, of data type `dtype`. A kernel
381+
parameter that is an array is passed as it is when it broadcasts
382+
along the leading dimensions of the output only, which makes its
383+
size divide the size of the output, and broadcast to the output
384+
shape otherwise.
382385
383386
With ``usm_type=None``, the output and the temporaries take the USM
384387
type of the array parameters and `out`, or ``"device"``.

0 commit comments

Comments
 (0)