Skip to content

Commit 99f3f12

Browse files
authored
Merge branch 'stdlib-js:develop' into develop
2 parents de90145 + 3704e0c commit 99f3f12

File tree

280 files changed

+21293
-433
lines changed

Some content is hidden

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

280 files changed

+21293
-433
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ The namespace exports the following:
7777
- <span class="signature">[`bbinary4d( arrays, shapes, fcn )`][@stdlib/array/base/broadcasted-binary4d]</span><span class="delimiter">: </span><span class="description">apply a binary callback to elements in two broadcasted nested input arrays and assign results to elements in a four-dimensional nested output array.</span>
7878
- <span class="signature">[`bbinary5d( arrays, shapes, fcn )`][@stdlib/array/base/broadcasted-binary5d]</span><span class="delimiter">: </span><span class="description">apply a binary callback to elements in two broadcasted nested input arrays and assign results to elements in a five-dimensional nested output array.</span>
7979
- <span class="signature">[`bquaternary2d( arrays, shapes, fcn )`][@stdlib/array/base/broadcasted-quaternary2d]</span><span class="delimiter">: </span><span class="description">apply a quaternary callback to elements in four broadcasted nested input arrays and assign results to elements in a two-dimensional nested output array.</span>
80-
- <span class="signature">[`bquinary2d( arrays, shapes, fcn )`][@stdlib/array/base/broadcasted-quinary2d]</span><span class="delimiter">: </span><span class="description">apply a quinary callback to elements in four broadcasted nested input arrays and assign results to elements in a two-dimensional nested output array.</span>
80+
- <span class="signature">[`bquinary2d( arrays, shapes, fcn )`][@stdlib/array/base/broadcasted-quinary2d]</span><span class="delimiter">: </span><span class="description">apply a quinary callback to elements in five broadcasted nested input arrays and assign results to elements in a two-dimensional nested output array.</span>
8181
- <span class="signature">[`bternary2d( arrays, shapes, fcn )`][@stdlib/array/base/broadcasted-ternary2d]</span><span class="delimiter">: </span><span class="description">apply a ternary callback to elements in three broadcasted nested input arrays and assign results to elements in a two-dimensional nested output array.</span>
8282
- <span class="signature">[`bunary2d( arrays, shapes, fcn )`][@stdlib/array/base/broadcasted-unary2d]</span><span class="delimiter">: </span><span class="description">apply a unary callback to elements in a broadcasted nested input array and assign results to elements in a two-dimensional nested output array.</span>
8383
- <span class="signature">[`bunary3d( arrays, shapes, fcn )`][@stdlib/array/base/broadcasted-unary3d]</span><span class="delimiter">: </span><span class="description">apply a unary callback to elements in a broadcasted nested input array and assign results to elements in a three-dimensional nested output array.</span>

lib/node_modules/@stdlib/array/base/flatten5d-by/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,12 @@ out = flatten5dBy( x, [ 2, 2, 1, 2, 2 ], true, fcn );
200200

201201
<section class="related">
202202

203+
* * *
204+
205+
## See Also
206+
207+
- <span class="package-name">[`@stdlib/array/base/flatten5d`][@stdlib/array/base/flatten5d]</span><span class="delimiter">: </span><span class="description">flatten a five-dimensional nested array.</span>
208+
203209
</section>
204210

205211
<!-- /.related -->
@@ -208,6 +214,12 @@ out = flatten5dBy( x, [ 2, 2, 1, 2, 2 ], true, fcn );
208214

209215
<section class="links">
210216

217+
<!-- <related-links> -->
218+
219+
[@stdlib/array/base/flatten5d]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/flatten5d
220+
221+
<!-- </related-links> -->
222+
211223
</section>
212224

213225
<!-- /.links -->

lib/node_modules/@stdlib/array/base/unary4d-by/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,16 @@ var cnt = context.count;
108108

109109
```javascript
110110
var abs = require( '@stdlib/math/base/special/abs' );
111-
111+
112112
function accessor() {
113113
// No-op...
114114
}
115-
115+
116116
var x = [ [ [ [ -1.0, -2.0 ], [ -3.0, -4.0 ] ] ] ];
117117
var y = [ [ [ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ] ] ];
118-
118+
119119
var shape = [ 1, 1, 2, 2 ];
120-
120+
121121
unary4dBy( [ x, y ], shape, abs, accessor );
122122
// y => [ [ [ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ] ] ]
123123
```

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ out = isSameArrayLike( x, y );
9191

9292
<section class="related">
9393

94+
* * *
95+
96+
## See Also
97+
98+
- <span class="package-name">[`@stdlib/assert/is-array-like`][@stdlib/assert/is-array-like]</span><span class="delimiter">: </span><span class="description">test if a value is array-like.</span>
99+
- <span class="package-name">[`@stdlib/assert/is-same-array`][@stdlib/assert/is-same-array]</span><span class="delimiter">: </span><span class="description">test if two arguments are both generic arrays and have the same values.</span>
100+
- <span class="package-name">[`@stdlib/assert/is-same-value`][@stdlib/assert/is-same-value]</span><span class="delimiter">: </span><span class="description">test if two arguments are the same value.</span>
101+
94102
</section>
95103

96104
<!-- /.related -->
@@ -103,6 +111,10 @@ out = isSameArrayLike( x, y );
103111

104112
<!-- <related-links> -->
105113

114+
[@stdlib/assert/is-array-like]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert/is-array-like
115+
116+
[@stdlib/assert/is-same-array]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert/is-same-array
117+
106118
<!-- </related-links> -->
107119

108120
</section>

lib/node_modules/@stdlib/blas/ext/base/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ var ns = extblas;
8282
- <span class="signature">[`dsortins( N, order, x, stride )`][@stdlib/blas/ext/base/dsortins]</span><span class="delimiter">: </span><span class="description">sort a double-precision floating-point strided array using insertion sort.</span>
8383
- <span class="signature">[`dsortsh( N, order, x, stride )`][@stdlib/blas/ext/base/dsortsh]</span><span class="delimiter">: </span><span class="description">sort a double-precision floating-point strided array using Shellsort.</span>
8484
- <span class="signature">[`dssum( N, x, stride )`][@stdlib/blas/ext/base/dssum]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using extended accumulation and returning an extended precision result.</span>
85-
- <span class="signature">[`dssumors( N, x, stride )`][@stdlib/blas/ext/base/dssumors]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using ordinary recursive summation with extended accumulation and returning an extended precision result.</span>
86-
- <span class="signature">[`dssumpw( N, x, stride )`][@stdlib/blas/ext/base/dssumpw]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using pairwise summation with extended accumulation and returning an extended precision result.</span>
85+
- <span class="signature">[`dssumors( N, x, strideX )`][@stdlib/blas/ext/base/dssumors]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using ordinary recursive summation with extended accumulation and returning an extended precision result.</span>
86+
- <span class="signature">[`dssumpw( N, x, strideX )`][@stdlib/blas/ext/base/dssumpw]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using pairwise summation with extended accumulation and returning an extended precision result.</span>
8787
- <span class="signature">[`dsum( N, x, stride )`][@stdlib/blas/ext/base/dsum]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements.</span>
8888
- <span class="signature">[`dsumkbn( N, x, stride )`][@stdlib/blas/ext/base/dsumkbn]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements using an improved Kahan–Babuška algorithm.</span>
8989
- <span class="signature">[`dsumkbn2( N, x, stride )`][@stdlib/blas/ext/base/dsumkbn2]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements using a second-order iterative Kahan–Babuška algorithm.</span>
@@ -155,7 +155,7 @@ var ns = extblas;
155155
- <span class="signature">[`ssum( N, x, stride )`][@stdlib/blas/ext/base/ssum]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements.</span>
156156
- <span class="signature">[`ssumkbn( N, x, stride )`][@stdlib/blas/ext/base/ssumkbn]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using an improved Kahan–Babuška algorithm.</span>
157157
- <span class="signature">[`ssumkbn2( N, x, stride )`][@stdlib/blas/ext/base/ssumkbn2]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using a second-order iterative Kahan–Babuška algorithm.</span>
158-
- <span class="signature">[`ssumors( N, x, stride )`][@stdlib/blas/ext/base/ssumors]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using ordinary recursive summation.</span>
158+
- <span class="signature">[`ssumors( N, x, strideX )`][@stdlib/blas/ext/base/ssumors]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using ordinary recursive summation.</span>
159159
- <span class="signature">[`ssumpw( N, x, strideX )`][@stdlib/blas/ext/base/ssumpw]</span><span class="delimiter">: </span><span class="description">calculate the sum of single-precision floating-point strided array elements using pairwise summation.</span>
160160

161161
</div>

lib/node_modules/@stdlib/blas/ext/base/dapxsumkbn2/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,10 @@ int main( void ) {
283283
284284
## See Also
285285
286-
- <span class="package-name">[`@stdlib/blas/ext/base/dapxsum`][@stdlib/blas/ext/base/dapxsum]</span><span class="delimiter">: </span><span class="description">adds a constant to each double-precision floating-point strided array element and computes the sum.</span>
286+
- <span class="package-name">[`@stdlib/blas/ext/base/dapxsum`][@stdlib/blas/ext/base/dapxsum]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each double-precision floating-point strided array element and compute the sum.</span>
287287
- <span class="package-name">[`@stdlib/blas/ext/base/dsumkbn2`][@stdlib/blas/ext/base/dsumkbn2]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements using a second-order iterative Kahan–Babuška algorithm.</span>
288-
- <span class="package-name">[`@stdlib/blas/ext/base/gapxsumkbn2`][@stdlib/blas/ext/base/gapxsumkbn2]</span><span class="delimiter">: </span><span class="description">adds a constant to each strided array element and computes the sum using a second-order iterative Kahan–Babuška algorithm.</span>
289-
- <span class="package-name">[`@stdlib/blas/ext/base/sapxsumkbn2`][@stdlib/blas/ext/base/sapxsumkbn2]</span><span class="delimiter">: </span><span class="description">adds a constant to each single-precision floating-point strided array element and computes the sum using a second-order iterative Kahan–Babuška algorithm.</span>
288+
- <span class="package-name">[`@stdlib/blas/ext/base/gapxsumkbn2`][@stdlib/blas/ext/base/gapxsumkbn2]</span><span class="delimiter">: </span><span class="description">add a constant to each strided array element and compute the sum using a second-order iterative Kahan–Babuška algorithm.</span>
289+
- <span class="package-name">[`@stdlib/blas/ext/base/sapxsumkbn2`][@stdlib/blas/ext/base/sapxsumkbn2]</span><span class="delimiter">: </span><span class="description">add a constant to each single-precision floating-point strided array element and compute the sum using a second-order iterative Kahan–Babuška algorithm.</span>
290290
291291
</section>
292292

lib/node_modules/@stdlib/blas/ext/base/dapxsumpw/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,10 @@ int main( void ) {
282282
283283
## See Also
284284
285-
- <span class="package-name">[`@stdlib/blas/ext/base/dapxsum`][@stdlib/blas/ext/base/dapxsum]</span><span class="delimiter">: </span><span class="description">adds a constant to each double-precision floating-point strided array element and computes the sum.</span>
285+
- <span class="package-name">[`@stdlib/blas/ext/base/dapxsum`][@stdlib/blas/ext/base/dapxsum]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each double-precision floating-point strided array element and compute the sum.</span>
286286
- <span class="package-name">[`@stdlib/blas/ext/base/dsumpw`][@stdlib/blas/ext/base/dsumpw]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements using pairwise summation.</span>
287-
- <span class="package-name">[`@stdlib/blas/ext/base/gapxsumpw`][@stdlib/blas/ext/base/gapxsumpw]</span><span class="delimiter">: </span><span class="description">adds a constant to each strided array element and computes the sum using pairwise summation.</span>
288-
- <span class="package-name">[`@stdlib/blas/ext/base/sapxsumpw`][@stdlib/blas/ext/base/sapxsumpw]</span><span class="delimiter">: </span><span class="description">adds a constant to each single-precision floating-point strided array element and computes the sum using pairwise summation.</span>
287+
- <span class="package-name">[`@stdlib/blas/ext/base/gapxsumpw`][@stdlib/blas/ext/base/gapxsumpw]</span><span class="delimiter">: </span><span class="description">add a constant to each strided array element and compute the sum using pairwise summation.</span>
288+
- <span class="package-name">[`@stdlib/blas/ext/base/sapxsumpw`][@stdlib/blas/ext/base/sapxsumpw]</span><span class="delimiter">: </span><span class="description">add a constant to each single-precision floating-point strided array element and compute the sum using pairwise summation.</span>
289289
290290
</section>
291291

lib/node_modules/@stdlib/blas/ext/base/docs/types/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ interface Namespace {
12661266
*
12671267
* @param N - number of indexed elements
12681268
* @param x - input array
1269-
* @param stride - stride length
1269+
* @param strideX - stride length
12701270
* @returns sum
12711271
*
12721272
* @example
@@ -1292,7 +1292,7 @@ interface Namespace {
12921292
*
12931293
* @param N - number of indexed elements
12941294
* @param x - input array
1295-
* @param stride - stride length
1295+
* @param strideX - stride length
12961296
* @returns sum
12971297
*
12981298
* @example
@@ -3223,7 +3223,7 @@ interface Namespace {
32233223
*
32243224
* @param N - number of indexed elements
32253225
* @param x - input array
3226-
* @param stride - stride length
3226+
* @param strideX - stride length
32273227
* @returns sum
32283228
*
32293229
* @example

lib/node_modules/@stdlib/blas/ext/base/dsumkbn/README.md

Lines changed: 126 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,26 @@ limitations under the License.
3636
var dsumkbn = require( '@stdlib/blas/ext/base/dsumkbn' );
3737
```
3838

39-
#### dsumkbn( N, x, stride )
39+
#### dsumkbn( N, x, strideX )
4040

4141
Computes the sum of double-precision floating-point strided array elements using an improved Kahan–Babuška algorithm.
4242

4343
```javascript
4444
var Float64Array = require( '@stdlib/array/float64' );
4545

4646
var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
47-
var N = x.length;
4847

49-
var v = dsumkbn( N, x, 1 );
48+
var v = dsumkbn( x.length, x, 1 );
5049
// returns 1.0
5150
```
5251

5352
The function has the following parameters:
5453

5554
- **N**: number of indexed elements.
5655
- **x**: input [`Float64Array`][@stdlib/array/float64].
57-
- **stride**: index increment for `x`.
56+
- **strideX**: stride length for `x`.
5857

59-
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to compute the sum of every other element in the strided array,
58+
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to compute the sum of every other element:
6059

6160
```javascript
6261
var Float64Array = require( '@stdlib/array/float64' );
@@ -81,7 +80,7 @@ var v = dsumkbn( 4, x1, 2 );
8180
// returns 5.0
8281
```
8382

84-
#### dsumkbn.ndarray( N, x, stride, offset )
83+
#### dsumkbn.ndarray( N, x, strideX, offsetX )
8584

8685
Computes the sum of double-precision floating-point strided array elements using an improved Kahan–Babuška algorithm and alternative indexing semantics.
8786

@@ -96,9 +95,9 @@ var v = dsumkbn.ndarray( 3, x, 1, 0 );
9695

9796
The function has the following additional parameters:
9897

99-
- **offset**: starting index for `x`.
98+
- **offsetX**: starting index for `x`.
10099

101-
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the offset parameter supports indexing semantics based on a starting index. For example, to calculate the sum of every other value in the strided array starting from the second value
100+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to calculate the sum of every other element starting from the second element:
102101

103102
```javascript
104103
var Float64Array = require( '@stdlib/array/float64' );
@@ -130,11 +129,12 @@ var v = dsumkbn.ndarray( 4, x, 2, 1 );
130129
<!-- eslint no-undef: "error" -->
131130

132131
```javascript
133-
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
134-
var filledarrayBy = require( '@stdlib/array/filled-by' );
132+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
135133
var dsumkbn = require( '@stdlib/blas/ext/base/dsumkbn' );
136134

137-
var x = filledarrayBy( 10, 'float64', discreteUniform( 0, 100 ) );
135+
var x = discreteUniform( 10.0, -100, 100, {
136+
'dtype': 'float64'
137+
});
138138
console.log( x );
139139

140140
var v = dsumkbn( x.length, x, 1 );
@@ -145,8 +145,123 @@ console.log( v );
145145

146146
<!-- /.examples -->
147147

148+
<!-- C interface documentation. -->
149+
148150
* * *
149151

152+
<section class="c">
153+
154+
## C APIs
155+
156+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
157+
158+
<section class="intro">
159+
160+
</section>
161+
162+
<!-- /.intro -->
163+
164+
<!-- C usage documentation. -->
165+
166+
<section class="usage">
167+
168+
### Usage
169+
170+
```c
171+
#include "stdlib/blas/ext/base/dsumkbn.h"
172+
```
173+
174+
#### stdlib_strided_dsumkbn( N, \*X, strideX )
175+
176+
Computes the sum of double-precision floating-point strided array elements using an improved Kahan–Babuška algorithm.
177+
178+
```c
179+
const double x[] = { 1.0, 2.0, 3.0, 4.0 };
180+
181+
double v = stdlib_strided_dsumkbn( 4, x, 1 );
182+
// returns 10.0
183+
```
184+
185+
The function accepts the following arguments:
186+
187+
- **N**: `[in] CBLAS_INT` number of indexed elements.
188+
- **X**: `[in] double*` input array.
189+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
190+
191+
```c
192+
double stdlib_strided_dsumkbn( const CBLAS_INT N, const double *X, const CBLAS_INT strideX );
193+
```
194+
195+
#### stdlib_strided_dsumkbn_ndarray( N, \*X, strideX, offsetX )
196+
197+
Computes the sum of double-precision floating-point strided array elements using an improved Kahan–Babuška algorithm and alternative indexing semantics.
198+
199+
```c
200+
const double x[] = { 1.0, 2.0, 3.0, 4.0 };
201+
202+
double v = stdlib_strided_dsumkbn_ndarray( 4, x, 1, 0 );
203+
// returns 10.0
204+
```
205+
206+
The function accepts the following arguments:
207+
208+
- **N**: `[in] CBLAS_INT` number of indexed elements.
209+
- **X**: `[in] double*` input array.
210+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
211+
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
212+
213+
```c
214+
double stdlib_strided_dsumkbn_ndarray( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
215+
```
216+
217+
</section>
218+
219+
<!-- /.usage -->
220+
221+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
222+
223+
<section class="notes">
224+
225+
</section>
226+
227+
<!-- /.notes -->
228+
229+
<!-- C API usage examples. -->
230+
231+
<section class="examples">
232+
233+
### Examples
234+
235+
```c
236+
#include "stdlib/blas/ext/base/dsumkbn.h"
237+
#include <stdio.h>
238+
239+
int main( void ) {
240+
// Create a strided array:
241+
const double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
242+
243+
// Specify the number of elements:
244+
const int N = 5;
245+
246+
// Specify the stride length:
247+
const int strideX = 2;
248+
249+
// Compute the sum:
250+
double v = stdlib_strided_dsumkbn( N, x, strideX );
251+
252+
// Print the result:
253+
printf( "sum: %lf\n", v );
254+
}
255+
```
256+
257+
</section>
258+
259+
<!-- /.examples -->
260+
261+
</section>
262+
263+
<!-- /.c -->
264+
150265
<section class="references">
151266
152267
## References

0 commit comments

Comments
 (0)