Skip to content

Commit 65f6a65

Browse files
committed
docs: add REPL help
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent b928b26 commit 65f6a65

File tree

1 file changed

+62
-0
lines changed
  • lib/node_modules/@stdlib/random/tools/unary-factory/docs

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
2+
{{alias}}( prng, idtypes, odtypes, policies[, options] )
3+
Returns a function for generating pseudorandom numbers drawn from single-
4+
parameter probability distribution.
5+
6+
Parameters
7+
----------
8+
prng: Function
9+
Unary pseudorandom number generator. Must have the following methods:
10+
11+
- factory: returns a new unary pseudorandom number generator.
12+
13+
idtypes: Array<string>
14+
List of supported input data types.
15+
16+
odtypes: Array<string>
17+
List of supported output data types.
18+
19+
policies: Object
20+
Interface policies. Must have the following properties:
21+
22+
- output: output data type policy.
23+
24+
options: Object (optional)
25+
Function options.
26+
27+
options.order: string (optional)
28+
Default memory layout order.
29+
30+
Returns
31+
-------
32+
fcn: Function
33+
Factory function for generating pseudorandom numbers drawn from single-
34+
parameter probability distribution. The function accepts a single
35+
optional argument:
36+
37+
- options: function options.
38+
39+
The function supports the following options:
40+
41+
- prng: pseudorandom number generator which generates uniformly
42+
distributed pseudorandom numbers.
43+
- seed: pseudorandom value generator seed.
44+
- state: pseudorandom value generator state.
45+
- copy: boolean indicating whether to copy a provided pseudorandom value
46+
generator state.
47+
48+
Examples
49+
--------
50+
> var dts = [ 'float64', 'float32', 'generic' ];
51+
> var p = { 'output': 'real_floating_point_and_generic' };
52+
> var r = {{alias:@stdlib/random/base/exponential}};
53+
> var f = {{alias}}( r, dts, dts, p );
54+
> var fcn = f();
55+
> fcn( [ 2, 2 ], 2.0 )
56+
<ndarray>
57+
> fcn( [ 2, 2 ], 2.0, { 'dtype': 'float32' } )
58+
<ndarray>
59+
60+
See Also
61+
--------
62+

0 commit comments

Comments
 (0)