Skip to content

Commit b75757a

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into ml-strided-dkmeanspp
2 parents e45a3aa + 7d90009 commit b75757a

404 files changed

Lines changed: 29671 additions & 499 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/node_modules/@stdlib/_tools/licenses/licenses/README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,22 @@ function onResults( error, results ) {
9797

9898
<section class="examples">
9999

100-
<!-- ## Examples
100+
## Examples
101101

102-
``` javascript
102+
<!-- eslint no-undef: "error" -->
103103

104-
``` -->
104+
```javascript
105+
var licenses = require( '@stdlib/_tools/licenses/licenses' );
106+
107+
licenses( onResults );
108+
109+
function onResults( error, results ) {
110+
if ( error ) {
111+
throw error;
112+
}
113+
console.log( JSON.stringify( results ) );
114+
}
115+
```
105116

106117
</section>
107118

lib/node_modules/@stdlib/_tools/licenses/licenses/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"directories": {
2121
"doc": "./docs",
2222
"example": "./examples",
23-
"lib": "./lib"
23+
"lib": "./lib",
24+
"test": "./test"
2425
},
2526
"scripts": {},
2627
"homepage": "https://github.com/stdlib-js/stdlib",
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2026 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var licenses = require( './../lib' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof licenses, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function throws an error if not provided a callback argument which is a function', function test( t ) {
36+
var values;
37+
var i;
38+
39+
values = [
40+
'5',
41+
5,
42+
NaN,
43+
true,
44+
false,
45+
null,
46+
undefined,
47+
[],
48+
{}
49+
];
50+
51+
for ( i = 0; i < values.length; i++ ) {
52+
t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided '+values[ i ] );
53+
}
54+
t.end();
55+
56+
function badValue( value ) {
57+
return function badValue() {
58+
licenses( value );
59+
};
60+
}
61+
});

lib/node_modules/@stdlib/array/float64/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,7 @@ console.log( arr );
14321432
## See Also
14331433

14341434
- <span class="package-name">[`@stdlib/array/buffer`][@stdlib/array/buffer]</span><span class="delimiter">: </span><span class="description">ArrayBuffer.</span>
1435+
- <span class="package-name">[`@stdlib/array/float16`][@stdlib/array/float16]</span><span class="delimiter">: </span><span class="description">Float16Array.</span>
14351436
- <span class="package-name">[`@stdlib/array/float32`][@stdlib/array/float32]</span><span class="delimiter">: </span><span class="description">Float32Array.</span>
14361437
- <span class="package-name">[`@stdlib/array/int16`][@stdlib/array/int16]</span><span class="delimiter">: </span><span class="description">Int16Array.</span>
14371438
- <span class="package-name">[`@stdlib/array/int32`][@stdlib/array/int32]</span><span class="delimiter">: </span><span class="description">Int32Array.</span>
@@ -1455,6 +1456,8 @@ console.log( arr );
14551456

14561457
[@stdlib/array/buffer]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/buffer
14571458

1459+
[@stdlib/array/float16]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/float16
1460+
14581461
[@stdlib/array/float32]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/float32
14591462

14601463
[@stdlib/array/int16]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/int16

lib/node_modules/@stdlib/assert/docs/types/index.d.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2755,10 +2755,11 @@ interface Namespace {
27552755
* @returns boolean indicating if a value is a 2-dimensional ndarray-like object whose underlying data type is `complex128`
27562756
*
27572757
* @example
2758-
* var Complex128Array = require( '@stdlib/array/complex128' );
2759-
* var ndarray = require( '@stdlib/ndarray/ctor' );
2758+
* var zeros = require( '@stdlib/ndarray/zeros' );
27602759
*
2761-
* var arr = ndarray( 'complex128', new Complex128Array( [ 0, 0, 0, 0, 0, 0, 0, 0 ] ), [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
2760+
* var arr = zeros( [ 2, 2 ], {
2761+
* 'dtype': 'complex128'
2762+
* });
27622763
*
27632764
* var bool = ns.isComplex128MatrixLike( arr );
27642765
* // returns true
@@ -2775,10 +2776,11 @@ interface Namespace {
27752776
* @returns boolean indicating if a value is an ndarray-like object whose underlying data type is `complex128`
27762777
*
27772778
* @example
2778-
* var Complex128Array = require( '@stdlib/array/complex128' );
2779-
* var ndarray = require( '@stdlib/ndarray/ctor' );
2779+
* var zeros = require( '@stdlib/ndarray/zeros' );
27802780
*
2781-
* var arr = ndarray( 'complex128', new Complex128Array( [ 0, 0, 0, 0, 0, 0, 0, 0 ] ), [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
2781+
* var arr = zeros( [ 2, 2 ], {
2782+
* 'dtype': 'complex128'
2783+
* });
27822784
*
27832785
* var bool = ns.isComplex128ndarrayLike( arr );
27842786
* // returns true
@@ -2795,10 +2797,11 @@ interface Namespace {
27952797
* @returns boolean indicating if a value is a 1-dimensional ndarray-like object whose underlying data type is `complex128`
27962798
*
27972799
* @example
2798-
* var Complex128Array = require( '@stdlib/array/complex128' );
2799-
* var ndarray = require( '@stdlib/ndarray/ctor' );
2800+
* var zeros = require( '@stdlib/ndarray/zeros' );
28002801
*
2801-
* var arr = ndarray( 'complex128', new Complex128Array( [ 0, 0, 0, 0, 0, 0, 0, 0 ] ), [ 4 ], [ 1 ], 0, 'row-major' );
2802+
* var arr = zeros( [ 4 ], {
2803+
* 'dtype': 'complex128'
2804+
* });
28022805
*
28032806
* var bool = ns.isComplex128VectorLike( arr );
28042807
* // returns true

lib/node_modules/@stdlib/assert/is-complex128matrix-like/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ var isComplex128MatrixLike = require( '@stdlib/assert/is-complex128matrix-like'
3535
Tests if a value is a 2-dimensional [ndarray][@stdlib/ndarray/ctor]-like object whose underlying data type is `complex128`.
3636

3737
```javascript
38-
var Complex128Array = require( '@stdlib/array/complex128' );
39-
var ndarray = require( '@stdlib/ndarray/ctor' );
38+
var zeros = require( '@stdlib/ndarray/zeros' );
4039

41-
var arr = ndarray( 'complex128', new Complex128Array( [ 0, 0, 0, 0, 0, 0, 0, 0 ] ), [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
40+
var arr = zeros( [ 2, 2 ], {
41+
'dtype': 'complex128'
42+
});
4243

4344
var bool = isComplex128MatrixLike( arr );
4445
// returns true
@@ -55,12 +56,12 @@ var bool = isComplex128MatrixLike( arr );
5556
<!-- eslint no-undef: "error" -->
5657

5758
```javascript
58-
var ndarray = require( '@stdlib/ndarray/ctor' );
59-
var Complex128Array = require( '@stdlib/array/complex128' );
59+
var zeros = require( '@stdlib/ndarray/zeros' );
6060
var isComplex128MatrixLike = require( '@stdlib/assert/is-complex128matrix-like' );
6161

62-
var buffer = new Complex128Array( [ 0, 0, 0, 0, 0, 0, 0, 0 ] );
63-
var arr = ndarray( 'complex128', buffer, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
62+
var arr = zeros( [ 2, 2 ], {
63+
'dtype': 'complex128'
64+
});
6465

6566
var out = isComplex128MatrixLike( arr );
6667
// returns true

lib/node_modules/@stdlib/assert/is-complex128matrix-like/benchmark/benchmark.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222

2323
var bench = require( '@stdlib/bench' );
2424
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
25-
var ndarray = require( '@stdlib/ndarray/ctor' );
26-
var Complex128Array = require( '@stdlib/array/complex128' );
25+
var zeros = require( '@stdlib/ndarray/zeros' );
2726
var format = require( '@stdlib/string/format' );
2827
var pkg = require( './../package.json' ).name;
2928
var isComplex128MatrixLike = require( './../lib' );
@@ -32,23 +31,14 @@ var isComplex128MatrixLike = require( './../lib' );
3231
// MAIN //
3332

3433
bench( format( '%s::true', pkg ), function benchmark( b ) {
35-
var strides;
36-
var offset;
37-
var buffer;
3834
var values;
39-
var shape;
40-
var order;
4135
var bool;
4236
var arr;
4337
var i;
4438

45-
buffer = new Complex128Array( [ 0, 0, 0, 0, 0, 0, 0, 0 ] );
46-
shape = [ 2, 2 ];
47-
strides = [ 2, 1 ];
48-
offset = 0;
49-
order = 'row-major';
50-
51-
arr = ndarray( 'complex128', buffer, shape, strides, offset, order );
39+
arr = zeros( [ 2, 2 ], {
40+
'dtype': 'complex128'
41+
});
5242

5343
values = [
5444
arr,

lib/node_modules/@stdlib/assert/is-complex128matrix-like/docs/repl.txt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,8 @@
1616

1717
Examples
1818
--------
19-
> var M = {};
20-
> M.data = new {{alias:@stdlib/array/complex128}}( [ 0, 0, 0, 0, 0, 0, 0, 0 ] );
21-
> M.ndims = 2;
22-
> M.shape = [ 2, 2 ];
23-
> M.strides = [ 2, 1 ];
24-
> M.offset = 0;
25-
> M.order = 'row-major';
26-
> M.dtype = 'complex128';
27-
> M.length = 4;
28-
> M.flags = {};
29-
> M.get = function get( i, j ) {};
30-
> M.set = function set( i, j ) {};
19+
> var opts = { 'dtype': 'complex128' };
20+
> var M = {{alias:@stdlib/ndarray/zeros}}( [ 2, 2 ], opts );
3121
> var bool = {{alias}}( M )
3222
true
3323
> bool = {{alias}}( [ 1, 2, 3, 4 ] )

lib/node_modules/@stdlib/assert/is-complex128matrix-like/docs/types/index.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
* @returns boolean indicating if a value is a 2-dimensional ndarray-like object whose underlying data type is `complex128`
2626
*
2727
* @example
28-
* var Complex128Array = require( '@stdlib/array/complex128' );
29-
* var ndarray = require( '@stdlib/ndarray/ctor' );
28+
* var zeros = require( '@stdlib/ndarray/zeros' );
3029
*
31-
* var arr = ndarray( 'complex128', new Complex128Array( [ 0, 0, 0, 0, 0, 0, 0, 0 ] ), [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
30+
* var arr = zeros( [ 2, 2 ], {
31+
* 'dtype': 'complex128'
32+
* });
3233
*
3334
* var bool = isComplex128MatrixLike( arr );
3435
* // returns true

lib/node_modules/@stdlib/assert/is-complex128matrix-like/examples/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818

1919
'use strict';
2020

21-
var ndarray = require( '@stdlib/ndarray/ctor' );
22-
var Complex128Array = require( '@stdlib/array/complex128' );
21+
var zeros = require( '@stdlib/ndarray/zeros' );
2322
var isComplex128MatrixLike = require( './../lib' );
2423

25-
var buffer = new Complex128Array( [ 0, 0, 0, 0, 0, 0, 0, 0 ] );
26-
var arr = ndarray( 'complex128', buffer, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
24+
var arr = zeros( [ 2, 2 ], {
25+
'dtype': 'complex128'
26+
});
2727

2828
console.log( isComplex128MatrixLike( arr ) );
2929
// => true

0 commit comments

Comments
 (0)