Skip to content

Commit d5df713

Browse files
committed
Auto-generated commit
1 parent 95c47b4 commit d5df713

File tree

5 files changed

+7
-73
lines changed

5 files changed

+7
-73
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ var len = out.length;
129129
// returns 10
130130
```
131131

132-
If provided `a` and `b`, the returned generator returns random variates from the specified distribution.
132+
If provided distribution parameters, the returned generator returns random variates from the specified distribution.
133133

134134
```javascript
135135
var random = arcsine.factory( 2.0, 5.0 );
@@ -141,7 +141,7 @@ out = random( 10 );
141141
// returns <Float64Array>
142142
```
143143

144-
If not provided `a` and `b`, the returned generator requires that both parameters be provided at each invocation.
144+
If not provided distribution parameters, the returned generator requires that distribution parameters be provided at each invocation.
145145

146146
```javascript
147147
var random = arcsine.factory();

docs/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ interface Random extends PRNG {
202202
*
203203
* ## Notes
204204
*
205-
* - When provided `a` and `b`, the returned function returns random variates drawn from the specified distribution.
205+
* - When provided distribution parameters, the returned function returns random variates drawn from the specified distribution.
206206
*
207207
* @param a - minimum support
208208
* @param b - maximum support
@@ -230,7 +230,7 @@ interface Random extends PRNG {
230230
*
231231
* ## Notes
232232
*
233-
* - When not provided `a` and `b`, the returned function requires that both `a` and `b` be provided at each invocation.
233+
* - When not provided distribution parameters, the returned function requires that distribution parameters be provided at each invocation.
234234
*
235235
* @param options - function options
236236
* @throws must provide a valid state

docs/types/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19+
import zeros = require( '@stdlib/array-zeros' );
1920
import random = require( './index' );
2021

2122

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
"url": "https://github.com/stdlib-js/stdlib/issues"
3838
},
3939
"dependencies": {
40-
"@stdlib/array-defaults": "github:stdlib-js/array-defaults#main",
40+
"@stdlib/array-defaults": "^0.1.0",
4141
"@stdlib/array-dtypes": "^0.1.0",
42-
"@stdlib/random-array-tools-binary-factory": "github:stdlib-js/random-array-tools-binary-factory#main",
42+
"@stdlib/random-array-tools-binary-factory": "^0.1.0",
4343
"@stdlib/random-base-arcsine": "^0.1.0",
4444
"@stdlib/types": "^0.2.0",
4545
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1"

test/test.factory.js

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -151,50 +151,6 @@ tape( 'the function throws an error if provided an invalid second distribution p
151151
}
152152
});
153153

154-
tape( 'the function throws an error if the second distribution parameter is less than the first distribution parameter', function test( t ) {
155-
var values;
156-
var i;
157-
158-
values = [
159-
[ 0.0, 0.0 ],
160-
[ -2.0, -4.0 ],
161-
[ 2.0, 1.0 ]
162-
];
163-
164-
for ( i = 0; i < values.length; i++ ) {
165-
t.throws( badValue( values[i] ), RangeError, 'throws an error when provided '+values[i] );
166-
}
167-
t.end();
168-
169-
function badValue( arr ) {
170-
return function badValue() {
171-
factory( arr[0], arr[1] );
172-
};
173-
}
174-
});
175-
176-
tape( 'the function throws an error if the second distribution parameter is less than the first distribution parameter (options)', function test( t ) {
177-
var values;
178-
var i;
179-
180-
values = [
181-
[ 0.0, 0.0 ],
182-
[ -2.0, -4.0 ],
183-
[ 2.0, 1.0 ]
184-
];
185-
186-
for ( i = 0; i < values.length; i++ ) {
187-
t.throws( badValue( values[i] ), RangeError, 'throws an error when provided '+values[i] );
188-
}
189-
t.end();
190-
191-
function badValue( arr ) {
192-
return function badValue() {
193-
factory( arr[0], arr[1], {} );
194-
};
195-
}
196-
});
197-
198154
tape( 'the function throws an error if provided an options argument which is not an object (parameters)', function test( t ) {
199155
var values;
200156
var i;
@@ -904,29 +860,6 @@ tape( 'when called without distribution parameters, the function returns a funct
904860
t.end();
905861
});
906862

907-
tape( 'when called without distribution parameters, the function returns a function that generates `NaN` values if the first distribution parameter is greater than or equal to the second distribution parameter', function test( t ) {
908-
var random;
909-
var values;
910-
var actual;
911-
var i;
912-
var j;
913-
914-
random = factory();
915-
values = [
916-
[ 2.0, 1.0 ],
917-
[ -3.0, -4.0 ],
918-
[ 0.0, 0.0 ]
919-
];
920-
921-
for ( i = 0; i < values.length; i++ ) {
922-
actual = random( 10, values[ i ][ 0 ], values[ i ][ 1 ] );
923-
for ( j = 0; j < actual.length; j++ ) {
924-
t.strictEqual( isnan( actual[ j ] ), true, 'returns expected value when provided '+values[ i ] );
925-
}
926-
}
927-
t.end();
928-
});
929-
930863
tape( 'the function supports specifying a PRNG seed', function test( t ) {
931864
var random;
932865
var arr1;

0 commit comments

Comments
 (0)