Skip to content

Commit 2f280d0

Browse files
committed
Auto-generated commit
1 parent f926886 commit 2f280d0

2 files changed

Lines changed: 240 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
### Features
1212

13+
- [`2926fcd`](https://github.com/stdlib-js/stdlib/commit/2926fcdf41648e14219bf8683328b3e630260c2a) - update `random` TypeScript declarations [(#9407)](https://github.com/stdlib-js/stdlib/pull/9407)
1314
- [`974bdef`](https://github.com/stdlib-js/stdlib/commit/974bdef0d286a3d61cbbcdea1a7a16255608541b) - add `t` to namespace
1415
- [`ff7ce26`](https://github.com/stdlib-js/stdlib/commit/ff7ce26b04b6cc4795ae8618959a5ba663719b6d) - add `random/t`
1516
- [`3645e6c`](https://github.com/stdlib-js/stdlib/commit/3645e6cbb0ba9697086ed14ff15b53847c7de441) - add `rayleigh` to namespace
@@ -152,6 +153,7 @@ A total of 10 issues were closed in this release:
152153

153154
<details>
154155

156+
- [`2926fcd`](https://github.com/stdlib-js/stdlib/commit/2926fcdf41648e14219bf8683328b3e630260c2a) - **feat:** update `random` TypeScript declarations [(#9407)](https://github.com/stdlib-js/stdlib/pull/9407) _(by stdlib-bot)_
155157
- [`54dedc8`](https://github.com/stdlib-js/stdlib/commit/54dedc875b59bba13e20c72a81f29bcf6df650be) - **docs:** update example _(by Athan Reines)_
156158
- [`4abc1e5`](https://github.com/stdlib-js/stdlib/commit/4abc1e583d211d7835a3c91e2b5d1561a16284e4) - **docs:** update example _(by Athan Reines)_
157159
- [`8b67e65`](https://github.com/stdlib-js/stdlib/commit/8b67e657187346504d985ad7b6cd9415f6514705) - **docs:** update example _(by Athan Reines)_

docs/types/index.d.ts

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,20 @@
2323
import arcsine = require( './../../arcsine' );
2424
import array = require( './../../array' );
2525
import base = require( './../../base' );
26+
import bernoulli = require( './../../bernoulli' );
2627
import beta = require( './../../beta' );
2728
import betaprime = require( './../../betaprime' );
2829
import binomial = require( './../../binomial' );
2930
import cauchy = require( './../../cauchy' );
31+
import chi = require( './../../chi' );
32+
import chisquare = require( './../../chisquare' );
3033
import cosine = require( './../../cosine' );
3134
import discreteUniform = require( './../../discrete-uniform' );
3235
import erlang = require( './../../erlang' );
3336
import exponential = require( './../../exponential' );
3437
import f = require( './../../f' );
3538
import gamma = require( './../../gamma' );
39+
import geometric = require( './../../geometric' );
3640
import gumbel = require( './../../gumbel' );
3741
import invgamma = require( './../../invgamma' );
3842
import iterators = require( './../../iter' );
@@ -44,10 +48,13 @@ import lognormal = require( './../../lognormal' );
4448
import negativeBinomial = require( './../../negative-binomial' );
4549
import normal = require( './../../normal' );
4650
import pareto1 = require( './../../pareto-type1' );
51+
import poisson = require( './../../poisson' );
52+
import rayleigh = require( './../../rayleigh' );
4753
import sample = require( './../../sample' );
4854
import shuffle = require( './../../shuffle' );
4955
import streams = require( './../../streams' );
5056
import strided = require( './../../strided' );
57+
import t = require( './../../t' );
5158
import tools = require( './../../tools' );
5259
import uniform = require( './../../uniform' );
5360
import weibull = require( './../../weibull' );
@@ -100,6 +107,39 @@ interface Namespace {
100107
*/
101108
base: typeof base;
102109

110+
/**
111+
* Generates pseudorandom numbers drawn from a Bernoulli distribution.
112+
*
113+
* @param shape - output shape
114+
* @param p - success probability
115+
* @param options - function options
116+
* @throws distribution parameters and the output shape must be broadcast compatible
117+
* @returns output ndarray
118+
*
119+
* @example
120+
* var out = ns.bernoulli( [ 3, 3 ], 0.5 );
121+
* // returns <ndarray>
122+
*
123+
* @example
124+
* var zeros = require( '@stdlib/ndarray/zeros' );
125+
*
126+
* var out = zeros( [ 3, 3 ] );
127+
* // returns <ndarray>
128+
*
129+
* var v = ns.bernoulli.assign( 0.5, out );
130+
* // returns <ndarray>
131+
*
132+
* var bool = ( v === out );
133+
* // returns true
134+
*
135+
* @example
136+
* var random = ns.bernoulli.factory();
137+
*
138+
* var out = random( [ 3, 3 ], 0.5 );
139+
* // returns <ndarray>
140+
*/
141+
bernoulli: typeof bernoulli;
142+
103143
/**
104144
* Generates pseudorandom numbers drawn from a beta distribution.
105145
*
@@ -236,6 +276,72 @@ interface Namespace {
236276
*/
237277
cauchy: typeof cauchy;
238278

279+
/**
280+
* Generates pseudorandom numbers drawn from a chi distribution.
281+
*
282+
* @param shape - output shape
283+
* @param k - degrees of freedom
284+
* @param options - function options
285+
* @throws distribution parameters and the output shape must be broadcast compatible
286+
* @returns output ndarray
287+
*
288+
* @example
289+
* var out = ns.chi( [ 3, 3 ], 2.0 );
290+
* // returns <ndarray>
291+
*
292+
* @example
293+
* var zeros = require( '@stdlib/ndarray/zeros' );
294+
*
295+
* var out = zeros( [ 3, 3 ] );
296+
* // returns <ndarray>
297+
*
298+
* var v = ns.chi.assign( 2.0, out );
299+
* // returns <ndarray>
300+
*
301+
* var bool = ( v === out );
302+
* // returns true
303+
*
304+
* @example
305+
* var random = ns.chi.factory();
306+
*
307+
* var out = random( [ 3, 3 ], 2.0 );
308+
* // returns <ndarray>
309+
*/
310+
chi: typeof chi;
311+
312+
/**
313+
* Generates pseudorandom numbers drawn from a chi-square distribution.
314+
*
315+
* @param shape - output shape
316+
* @param k - degrees of freedom
317+
* @param options - function options
318+
* @throws distribution parameters and the output shape must be broadcast compatible
319+
* @returns output ndarray
320+
*
321+
* @example
322+
* var out = ns.chisquare( [ 3, 3 ], 2.0 );
323+
* // returns <ndarray>
324+
*
325+
* @example
326+
* var zeros = require( '@stdlib/ndarray/zeros' );
327+
*
328+
* var out = zeros( [ 3, 3 ] );
329+
* // returns <ndarray>
330+
*
331+
* var v = ns.chisquare.assign( 2.0, out );
332+
* // returns <ndarray>
333+
*
334+
* var bool = ( v === out );
335+
* // returns true
336+
*
337+
* @example
338+
* var random = ns.chisquare.factory();
339+
*
340+
* var out = random( [ 3, 3 ], 2.0 );
341+
* // returns <ndarray>
342+
*/
343+
chisquare: typeof chisquare;
344+
239345
/**
240346
* Generates pseudorandom numbers drawn from a raised cosine distribution.
241347
*
@@ -439,6 +545,39 @@ interface Namespace {
439545
*/
440546
gamma: typeof gamma;
441547

548+
/**
549+
* Generates pseudorandom numbers drawn from a geometric distribution.
550+
*
551+
* @param shape - output shape
552+
* @param p - success probability
553+
* @param options - function options
554+
* @throws distribution parameters and the output shape must be broadcast compatible
555+
* @returns output ndarray
556+
*
557+
* @example
558+
* var out = ns.geometric( [ 3, 3 ], 0.01 );
559+
* // returns <ndarray>
560+
*
561+
* @example
562+
* var zeros = require( '@stdlib/ndarray/zeros' );
563+
*
564+
* var out = zeros( [ 3, 3 ] );
565+
* // returns <ndarray>
566+
*
567+
* var v = ns.geometric.assign( 0.01, out );
568+
* // returns <ndarray>
569+
*
570+
* var bool = ( v === out );
571+
* // returns true
572+
*
573+
* @example
574+
* var random = ns.geometric.factory();
575+
*
576+
* var out = random( [ 3, 3 ], 0.01 );
577+
* // returns <ndarray>
578+
*/
579+
geometric: typeof geometric;
580+
442581
/**
443582
* Generates pseudorandom numbers drawn from a Gumbel distribution.
444583
*
@@ -784,6 +923,72 @@ interface Namespace {
784923
*/
785924
pareto1: typeof pareto1;
786925

926+
/**
927+
* Generates pseudorandom numbers drawn from a Poisson distribution.
928+
*
929+
* @param shape - output shape
930+
* @param lambda - mean parameter
931+
* @param options - function options
932+
* @throws distribution parameters and the output shape must be broadcast compatible
933+
* @returns output ndarray
934+
*
935+
* @example
936+
* var out = ns.poisson( [ 3, 3 ], 2.0 );
937+
* // returns <ndarray>
938+
*
939+
* @example
940+
* var zeros = require( '@stdlib/ndarray/zeros' );
941+
*
942+
* var out = zeros( [ 3, 3 ] );
943+
* // returns <ndarray>
944+
*
945+
* var v = ns.poisson.assign( 2.0, out );
946+
* // returns <ndarray>
947+
*
948+
* var bool = ( v === out );
949+
* // returns true
950+
*
951+
* @example
952+
* var random = ns.poisson.factory();
953+
*
954+
* var out = random( [ 3, 3 ], 2.0 );
955+
* // returns <ndarray>
956+
*/
957+
poisson: typeof poisson;
958+
959+
/**
960+
* Generates pseudorandom numbers drawn from a Rayleigh distribution.
961+
*
962+
* @param shape - output shape
963+
* @param sigma - scale parameter
964+
* @param options - function options
965+
* @throws distribution parameters and the output shape must be broadcast compatible
966+
* @returns output ndarray
967+
*
968+
* @example
969+
* var out = ns.rayleigh( [ 3, 3 ], 2.0 );
970+
* // returns <ndarray>
971+
*
972+
* @example
973+
* var zeros = require( '@stdlib/ndarray/zeros' );
974+
*
975+
* var out = zeros( [ 3, 3 ] );
976+
* // returns <ndarray>
977+
*
978+
* var v = ns.rayleigh.assign( 2.0, out );
979+
* // returns <ndarray>
980+
*
981+
* var bool = ( v === out );
982+
* // returns true
983+
*
984+
* @example
985+
* var random = ns.rayleigh.factory();
986+
*
987+
* var out = random( [ 3, 3 ], 2.0 );
988+
* // returns <ndarray>
989+
*/
990+
rayleigh: typeof rayleigh;
991+
787992
/**
788993
* Samples elements from an array-like object.
789994
*
@@ -836,6 +1041,39 @@ interface Namespace {
8361041
*/
8371042
strided: typeof strided;
8381043

1044+
/**
1045+
* Generates pseudorandom numbers drawn from a Student's t-distribution.
1046+
*
1047+
* @param shape - output shape
1048+
* @param v - degrees of freedom
1049+
* @param options - function options
1050+
* @throws distribution parameters and the output shape must be broadcast compatible
1051+
* @returns output ndarray
1052+
*
1053+
* @example
1054+
* var out = ns.t( [ 3, 3 ], 2.0 );
1055+
* // returns <ndarray>
1056+
*
1057+
* @example
1058+
* var zeros = require( '@stdlib/ndarray/zeros' );
1059+
*
1060+
* var out = zeros( [ 3, 3 ] );
1061+
* // returns <ndarray>
1062+
*
1063+
* var v = ns.t.assign( 2.0, out );
1064+
* // returns <ndarray>
1065+
*
1066+
* var bool = ( v === out );
1067+
* // returns true
1068+
*
1069+
* @example
1070+
* var random = ns.t.factory();
1071+
*
1072+
* var out = random( [ 3, 3 ], 2.0 );
1073+
* // returns <ndarray>
1074+
*/
1075+
t: typeof t;
1076+
8391077
/**
8401078
* Pseudorandom number generator ndarray creation function tools.
8411079
*/

0 commit comments

Comments
 (0)