Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Aug 17, 2023
1 parent 6012338 commit 337047d
Show file tree
Hide file tree
Showing 21 changed files with 241 additions and 89 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/productionize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,6 @@ jobs:
id: transform-error-messages
uses: stdlib-js/transform-errors-action@main

# Format error messages:
- name: 'Replace double quotes with single quotes in rewritten format string error messages'
run: |
find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \;
# Format string literal error messages:
- name: 'Replace double quotes with single quotes in rewritten string literal error messages'
run: |
find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \;
# Format code:
- name: 'Replace double quotes with single quotes in inserted `require` calls'
run: |
find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \;
# Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency:
- name: 'Update dependencies in package.json'
run: |
Expand Down
52 changes: 26 additions & 26 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -181,32 +181,6 @@ The library links against the following external libraries or contains
implementations from the following external libraries, which have their own
licenses:

* Boost <http://www.boost.org/LICENSE_1_0.txt>

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

* MT19937 <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/
mt19937ar.c>

Expand Down Expand Up @@ -240,3 +214,29 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

* Boost <http://www.boost.org/LICENSE_1_0.txt>

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

3 changes: 3 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// <reference path="../docs/types/index.d.ts" />
import ns from '../docs/types/index';
export = ns;
157 changes: 157 additions & 0 deletions dist/index.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions dist/index.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions strided/arcsine/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// <reference types="@stdlib/types"/>

import * as random from '@stdlib/types/random';
import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Interface defining function options.
Expand Down Expand Up @@ -77,7 +77,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* arcsine( out.length, [ 2.0 ], 0, [ 5.0 ], 0, out, 1 );
*/
<T = any>( N: number, a: Collection, sa: number, b: Collection, sb: number, out: Collection<T>, so: number, options?: Options ): Collection<T>;
<T = unknown>( N: number, a: Collection, sa: number, b: Collection, sb: number, out: Collection<T>, so: number, options?: Options ): Collection<T | number>;

/**
* Fills a strided array with pseudorandom numbers drawn from an arcsine distribution using alternative indexing semantics.
Expand Down Expand Up @@ -107,7 +107,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* arcsine.ndarray( out.length, [ 2.0 ], 0, 0, [ 5.0 ], 0, 0, out, 1, 0 );
*/
ndarray<T = any>( N: number, a: Collection, sa: number, oa: number, b: Collection, sb: number, ob: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T>;
ndarray<T = unknown>( N: number, a: Collection, sa: number, oa: number, b: Collection, sb: number, ob: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T | number>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions strided/beta/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// <reference types="@stdlib/types"/>

import * as random from '@stdlib/types/random';
import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Interface defining function options.
Expand Down Expand Up @@ -77,7 +77,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* beta( out.length, [ 2.0 ], 0, [ 5.0 ], 0, out, 1 );
*/
<T = any>( N: number, alpha: Collection, sa: number, beta: Collection, sb: number, out: Collection<T>, so: number, options?: Options ): Collection<T>;
<T = unknown>( N: number, alpha: Collection, sa: number, beta: Collection, sb: number, out: Collection<T>, so: number, options?: Options ): Collection<T | number>;

/**
* Fills a strided array with pseudorandom numbers drawn from a beta distribution using alternative indexing semantics.
Expand Down Expand Up @@ -107,7 +107,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* beta.ndarray( out.length, [ 2.0 ], 0, 0, [ 5.0 ], 0, 0, out, 1, 0 );
*/
ndarray<T = any>( N: number, alpha: Collection, sa: number, oa: number, beta: Collection, sb: number, ob: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T>;
ndarray<T = unknown>( N: number, alpha: Collection, sa: number, oa: number, beta: Collection, sb: number, ob: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T | number>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions strided/betaprime/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// <reference types="@stdlib/types"/>

import * as random from '@stdlib/types/random';
import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Interface defining function options.
Expand Down Expand Up @@ -77,7 +77,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* betaprime( out.length, [ 2.0 ], 0, [ 5.0 ], 0, out, 1 );
*/
<T = any>( N: number, alpha: Collection, sa: number, beta: Collection, sb: number, out: Collection<T>, so: number, options?: Options ): Collection<T>;
<T = unknown>( N: number, alpha: Collection, sa: number, beta: Collection, sb: number, out: Collection<T>, so: number, options?: Options ): Collection<T | number>;

/**
* Fills a strided array with pseudorandom numbers drawn from a beta prime distribution using alternative indexing semantics.
Expand Down Expand Up @@ -107,7 +107,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* betaprime.ndarray( out.length, [ 2.0 ], 0, 0, [ 5.0 ], 0, 0, out, 1, 0 );
*/
ndarray<T = any>( N: number, alpha: Collection, sa: number, oa: number, beta: Collection, sb: number, ob: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T>;
ndarray<T = unknown>( N: number, alpha: Collection, sa: number, oa: number, beta: Collection, sb: number, ob: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T | number>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions strided/cosine/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// <reference types="@stdlib/types"/>

import * as random from '@stdlib/types/random';
import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Interface defining function options.
Expand Down Expand Up @@ -77,7 +77,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* cosine( out.length, [ 2.0 ], 0, [ 5.0 ], 0, out, 1 );
*/
<T = any>( N: number, mu: Collection, sm: number, s: Collection, ss: number, out: Collection<T>, so: number, options?: Options ): Collection<T>;
<T = unknown>( N: number, mu: Collection, sm: number, s: Collection, ss: number, out: Collection<T>, so: number, options?: Options ): Collection<T | number>;

/**
* Fills a strided array with pseudorandom numbers drawn from a raised cosine distribution using alternative indexing semantics.
Expand Down Expand Up @@ -107,7 +107,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* cosine.ndarray( out.length, [ 2.0 ], 0, 0, [ 5.0 ], 0, 0, out, 1, 0 );
*/
ndarray<T = any>( N: number, mu: Collection, sm: number, om: number, s: Collection, ss: number, os: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T>;
ndarray<T = unknown>( N: number, mu: Collection, sm: number, om: number, s: Collection, ss: number, os: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T | number>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions strided/discrete-uniform/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// <reference types="@stdlib/types"/>

import * as random from '@stdlib/types/random';
import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Interface defining function options.
Expand Down Expand Up @@ -77,7 +77,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* discreteUniform( out.length, [ -10 ], 0, [ 10 ], 0, out, 1 );
*/
<T = any>( N: number, a: Collection, sa: number, b: Collection, sb: number, out: Collection<T>, so: number, options?: Options ): Collection<T>;
<T = unknown>( N: number, a: Collection, sa: number, b: Collection, sb: number, out: Collection<T>, so: number, options?: Options ): Collection<T | number>;

/**
* Fills a strided array with pseudorandom numbers drawn from a discrete uniform distribution using alternative indexing semantics.
Expand Down Expand Up @@ -107,7 +107,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* discreteUniform.ndarray( out.length, [ -10 ], 0, 0, [ 10 ], 0, 0, out, 1, 0 );
*/
ndarray<T = any>( N: number, a: Collection, sa: number, oa: number, b: Collection, sb: number, ob: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T>;
ndarray<T = unknown>( N: number, a: Collection, sa: number, oa: number, b: Collection, sb: number, ob: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T | number>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions strided/exponential/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// <reference types="@stdlib/types"/>

import * as random from '@stdlib/types/random';
import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Interface defining function options.
Expand Down Expand Up @@ -75,7 +75,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* exponential( out.length, [ 2.0 ], 0, out, 1 );
*/
<T = any>( N: number, lambda: Collection, sl: number, out: Collection<T>, so: number, options?: Options ): Collection<T>;
<T = unknown>( N: number, lambda: Collection, sl: number, out: Collection<T>, so: number, options?: Options ): Collection<T | number>;

/**
* Fills a strided array with pseudorandom numbers drawn from an exponential distribution using alternative indexing semantics.
Expand All @@ -102,7 +102,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* exponential.ndarray( out.length, [ 2.0 ], 0, 0, out, 1, 0 );
*/
ndarray<T = any>( N: number, lambda: Collection, sl: number, ol: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T>;
ndarray<T = unknown>( N: number, lambda: Collection, sl: number, ol: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T | number>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions strided/gamma/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// <reference types="@stdlib/types"/>

import * as random from '@stdlib/types/random';
import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Interface defining function options.
Expand Down Expand Up @@ -77,7 +77,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* gamma( out.length, [ 2.0 ], 0, [ 5.0 ], 0, out, 1 );
*/
<T = any>( N: number, alpha: Collection, sa: number, beta: Collection, sb: number, out: Collection<T>, so: number, options?: Options ): Collection<T>;
<T = unknown>( N: number, alpha: Collection, sa: number, beta: Collection, sb: number, out: Collection<T>, so: number, options?: Options ): Collection<T | number>;

/**
* Fills a strided array with pseudorandom numbers drawn from a gamma distribution using alternative indexing semantics.
Expand Down Expand Up @@ -107,7 +107,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* gamma.ndarray( out.length, [ 2.0 ], 0, 0, [ 5.0 ], 0, 0, out, 1, 0 );
*/
ndarray<T = any>( N: number, alpha: Collection, sa: number, oa: number, beta: Collection, sb: number, ob: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T>;
ndarray<T = unknown>( N: number, alpha: Collection, sa: number, oa: number, beta: Collection, sb: number, ob: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T | number>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions strided/invgamma/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// <reference types="@stdlib/types"/>

import * as random from '@stdlib/types/random';
import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Interface defining function options.
Expand Down Expand Up @@ -77,7 +77,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* invgamma( out.length, [ 2.0 ], 0, [ 5.0 ], 0, out, 1 );
*/
<T = any>( N: number, alpha: Collection, sa: number, beta: Collection, sb: number, out: Collection<T>, so: number, options?: Options ): Collection<T>;
<T = unknown>( N: number, alpha: Collection, sa: number, beta: Collection, sb: number, out: Collection<T>, so: number, options?: Options ): Collection<T | number>;

/**
* Fills a strided array with pseudorandom numbers drawn from an inverse gamma distribution using alternative indexing semantics.
Expand Down Expand Up @@ -107,7 +107,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* invgamma.ndarray( out.length, [ 2.0 ], 0, 0, [ 5.0 ], 0, 0, out, 1, 0 );
*/
ndarray<T = any>( N: number, alpha: Collection, sa: number, oa: number, beta: Collection, sb: number, ob: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T>;
ndarray<T = unknown>( N: number, alpha: Collection, sa: number, oa: number, beta: Collection, sb: number, ob: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T | number>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions strided/lognormal/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// <reference types="@stdlib/types"/>

import * as random from '@stdlib/types/random';
import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Interface defining function options.
Expand Down Expand Up @@ -77,7 +77,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* lognormal( out.length, [ 2.0 ], 0, [ 5.0 ], 0, out, 1 );
*/
<T = any>( N: number, mu: Collection, sm: number, sigma: Collection, ss: number, out: Collection<T>, so: number, options?: Options ): Collection<T>;
<T = unknown>( N: number, mu: Collection, sm: number, sigma: Collection, ss: number, out: Collection<T>, so: number, options?: Options ): Collection<T | number>;

/**
* Fills a strided array with pseudorandom numbers drawn from a lognormal distribution using alternative indexing semantics.
Expand Down Expand Up @@ -107,7 +107,7 @@ interface Routine {
* // Fill the array with pseudorandom numbers:
* lognormal.ndarray( out.length, [ 2.0 ], 0, 0, [ 5.0 ], 0, 0, out, 1, 0 );
*/
ndarray<T = any>( N: number, mu: Collection, sm: number, om: number, sigma: Collection, ss: number, os: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T>;
ndarray<T = unknown>( N: number, mu: Collection, sm: number, om: number, sigma: Collection, ss: number, os: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T | number>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions strided/minstd-shuffle/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// <reference types="@stdlib/types"/>

import * as random from '@stdlib/types/random';
import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Interface defining function options.
Expand Down Expand Up @@ -67,7 +67,7 @@ interface NormalizedRoutine {
* // Fill the array with pseudorandom numbers:
* minstd.normalized( out.length, out, 1 );
*/
<T = any>( N: number, out: Collection<T>, so: number, options?: Options ): Collection<T>;
<T = unknown>( N: number, out: Collection<T>, so: number, options?: Options ): Collection<T | number>;

/**
* Fills a strided array with pseudorandom numbers on the interval `[0, 1)` using alternative indexing semantics.
Expand All @@ -90,7 +90,7 @@ interface NormalizedRoutine {
* // Fill the array with pseudorandom numbers:
* minstd.normalized.ndarray( out.length, out, 1, 0 );
*/
ndarray<T = any>( N: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T>;
ndarray<T = unknown>( N: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T | number>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions strided/minstd/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// <reference types="@stdlib/types"/>

import * as random from '@stdlib/types/random';
import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Interface defining function options.
Expand Down Expand Up @@ -67,7 +67,7 @@ interface NormalizedRoutine {
* // Fill the array with pseudorandom numbers:
* minstd.normalized( out.length, out, 1 );
*/
<T = any>( N: number, out: Collection<T>, so: number, options?: Options ): Collection<T>;
<T = unknown>( N: number, out: Collection<T>, so: number, options?: Options ): Collection<T | number>;

/**
* Fills a strided array with pseudorandom numbers on the interval `[0, 1)` using alternative indexing semantics.
Expand All @@ -90,7 +90,7 @@ interface NormalizedRoutine {
* // Fill the array with pseudorandom numbers:
* minstd.normalized.ndarray( out.length, out, 1, 0 );
*/
ndarray<T = any>( N: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T>;
ndarray<T = unknown>( N: number, out: Collection<T>, so: number, oo: number, options?: Options ): Collection<T | number>;
}

/**
Expand Down
Loading

0 comments on commit 337047d

Please sign in to comment.