8000 Merge branch 'develop' of https://github.com/stdlib-js/stdlib into de… · stdlib-js/stdlib@8204e8b · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8204e8b

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents 7d5eb79 + 75da936 commit 8204e8b

File tree

239 files changed

+10219
-1959
lines changed

Some content is hidden

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

239 files changed

+10219
-1959
lines changed

.devcontainer/README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<!--
2+
3+
@license Apache-2.0
4+
5+
Copyright (c) 2024 The Stdlib Authors.
6+
7+
Licensed under the Apache License, Version 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
21+
[![Open in GitHub Codespaces][github-codespaces-image]][github-codespaces-url]
22+
23+
[![Open in Dev Containers][dev-container-image]][dev-container-url]
24+
25+
# Development Container
26+
27+
> Development container for `stdlib`.
28+
29+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
30+
31+
<section class="intro">
32+
33+
This folder includes configuration for developing the project in a local container or using [GitHub Codespaces][github-codespaces].
34+
35+
</section>
36+
37+
<!-- /.intro -->
38+
39+
<!-- Section to include usage notes. -->
40+
41+
<section class="usage">
42+
43+
</section>
44+
45+
<!-- /.usage -->
46+
47+
<!-- Section to include usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
48+
49+
<section class="notes">
50+
51+
</section>
52+
53+
<!-- /.notes -->
54+
55+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
56+
57+
<section class="links">
58+
59+
[dev-container-image]: https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode
60+
61+
[dev-container-url]: https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/stdlib-js/stdlib
62+
63+
[github-codespaces]: https://github.com/features/codespaces
64+
65+
[github-codespaces-image]: https://github.com/codespaces/badge.svg
66+
67+
[github-codespaces-url]: https://codespaces.new/stdlib-js/stdlib
68+
69+
</section>
70+
71+
<!-- /.links -->

.devcontainer/devcontainer.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "stdlib - OSS Development",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye",
4+
"features": {
5+
"ghcr.io/devcontainers/features/python:1": {},
6+
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {},
7+
"ghcr.io/julialang/devcontainer-features/julia:1": {},
8+
"ghcr.io/marcozac/devcontainer-features/shellcheck:1": {},
9+
"ghcr.io/rocker-org/devcontainer-features/pandoc:1": {}
10+
},
11+
"postCreateCommand": "./.devcontainer/post-create",
12+
"customizations": {
13+
"codespaces": {
14+
"openFiles": [
15+
"README.md"
16+
]
17+
},
18+
"vscode": {
19+
"settings": {
20+
"resmon.show.battery": false,
21+
"resmon.show.cpufreq": false
22+
},
23+
"extensions": [
24+
"dbaeumer.vscode-eslint",
25+
"EditorConfig.EditorConfig",
26+
"formulahendry.code-runner",
27+
"vsls-contrib.codetour"
28+
]
29+
}
30+
}
31+
}

.devcontainer/post-create

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
#
3+
# @license Apache-2.0
4+
#
5+
# Copyright (c) 2024 The Stdlib Authors.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
19+
# Script to set up a development environment.
20+
21+
make install
22+
make init

.mailmap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ Pratik <97464067+Pratik772846@users.noreply.github.com> Pratik772846
9898

9999
Priyansh <88396544+itsspriyansh@users.noreply.github.com> itsspriyansh
100100

101+
Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com> <56391001+Pushpendra766@users.noreply.github.com>
102+
Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com> Pushpendra766
103+
101104
# R
102105

103106
Raunak Kumar Gupta <raunakmodanwal321@gmail.com> <95216822+raunak-dev-edu@users.noreply.github.com>
@@ -137,6 +140,10 @@ Stephannie Jiménez Gacha <steff456@hotmail.com> <steff456@users.noreply.github.
137140
Stephannie Jiménez Gacha <steff456@hotmail.com> Stephannie Jimenez
138141
Stephannie Jiménez Gacha <steff456@hotmail.com> Stephannie Jimenez Gacha
139142

143+
# T
144+
145+
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com> tudor-pagu
146+
140147
# U
141148

142149
Utkarsh <http://utkarsh11105@gmail.com> <137638507+Ut-the-pro@users.noreply.github.com>

CONTRIBUTORS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Joris Labie <joris.labie1@gmail.com>
3636
Justin Dennison <justin1dennison@gmail.com>
3737
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
3838
Khaldon <kahmd1444@gmail.com>
39+
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
3940
Lovelin <100030865+lovelindhoni@users.noreply.github.com>
4041
Manik Sharma <maniksharma.rke@gmail.com>
4142
Marcus Fantham <mfantham@users.noreply.github.com>
@@ -45,6 +46,7 @@ Milan Raj <rajsite@users.noreply.github.com>
4546
Momtchil Momtchev <momtchil@momtchev.com>
4647
Muhammad Haris <harriskhan047@outlook.com>
4748
Naresh Jagadeesan <naresh.naresh000@gmail.com>
49+
NightKnight <Ahmedatwa866@yahoo.com>
4850
Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
4951
Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
5052
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
@@ -54,6 +56,7 @@ Pranav Goswami <goswami.4@iitj.ac.in>
5456
Praneki <97080887+PraneGIT@users.noreply.github.com>
5557
Pratik <97464067+Pratik772846@users.noreply.github.com>
5658
Priyansh <88396544+itsspriyansh@users.noreply.github.com>
59+
Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com>
5760
Raunak Kumar Gupta <raunakmodanwal321@gmail.com>
5861
Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
5962
Ricky Reusser <rsreusser@gmail.com>
@@ -72,6 +75,7 @@ Spandan Barve <contact@marsian.dev>
7275
Stephannie Jiménez Gacha <steff456@hotmail.com>
7376
Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com>
7477
Tirtadwipa Manunggal <tirtadwipa.manunggal@gmail.com>
78+
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
7579
Utkarsh <http://utkarsh11105@gmail.com>
7680
Utkarsh Raj <rajutkarsh2505@gmail.com>
7781
Varad Gupta <varadgupta21@gmail.com>

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

Lines changed: 9 additions & 22 deletions
10000
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,18 @@ var v = dapxsum( N, 5.0, x, 1 );
5353
The function has the following parameters:
5454

5555
- **N**: number of indexed elements.
56+
- **alpha**: scalar constant.
5657
- **x**: input [`Float64Array`][@stdlib/array/float64].
5758
- **stride**: index increment for `x`.
5859

59-
The `N` and `stride` parameters determine which elements in `x` are accessed at runtime. For example, to access every other element in `x`,
60+
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to access every other element in `x`,
6061

6162
```javascript
6263
var Float64Array = require( '@stdlib/array/float64' );
63-
var floor = require( '@stdlib/math/base/special/floor' );
6464

6565
var x = new Float64Array( [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0 ] );
66-
var N = floor( x.length / 2 );
6766

68-
var v = dapxsum( N, 5.0, x, 2 );
67+
var v = dapxsum( 4, 5.0, x, 2 );
6968
// returns 25.0
7069
```
7170

@@ -75,14 +74,11 @@ Note that indexing is relative to the first index. To introduce an offset, use [
7574

7675
```javascript
7776
var Float64Array = require( '@stdlib/array/float64' );
78-
var floor = require( '@stdlib/math/base/special/floor' );
7977

8078
var x0 = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
8179
var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
8280

83-
var N = floor( x0.length / 2 );
84-
85-
var v = dapxsum( N, 5.0, x1, 2 );
81+
var v = dapxsum( 4, 5.0, x1, 2 );
8682
// returns 25.0
8783
```
8884

@@ -104,16 +100,14 @@ The function has the following additional parameters:
104100

105101
- **offset**: starting index for `x`.
106102

107-
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 access every other value in `x` starting from the second value
103+
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 access every other value in `x` starting from the second value
108104

109105
```javascript
110106
var Float64Array = require( '@stdlib/array/float64' );
111-
var floor = require( '@stdlib/math/base/special/floor' );
112107

113108
var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
114-
var N = floor( x.length / 2 );
115109

116-
var v = dapxsum.ndarray( N, 5.0, x, 2, 1 );
110+
var v = dapxsum.ndarray( 4, 5.0, x, 2, 1 );
117111
// returns 25.0
118112
```
119113

@@ -138,18 +132,11 @@ var v = dapxsum.ndarray( N, 5.0, x, 2, 1 );
138132
<!-- eslint no-undef: "error" -->
139133

140134
```javascript
141-
var randu = require( '@stdlib/random/base/randu' );
142-
var round = require( '@stdlib/math/base/special/round' );
143-
var Float64Array = require( '@stdlib/array/float64' );
135+
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
136+
var filledarrayBy = require( '@stdlib/array/filled-by' );
144137
var dapxsum = require( '@stdlib/blas/ext/base/dapxsum' );
145138

146-
var x;
147-
var i;
148-
149-
x = new Float64Array( 10 );
150-
for ( i = 0; i < x.length; i++ ) {
151-
x[ i ] = round( randu()*100.0 );
152-
}
139+
var x = filledarrayBy( 10, 'float64', discreteUniform( 0, 100 ) );
153140
console.log( x );
154141

155142
var v = dapxsum( x.length, 5.0, x, 1 );

lib/node_modules/@stdlib/blas/ext/base/dapxsum/benchmark/benchmark.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,19 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24-
var randu = require( '@stdlib/random/base/randu' );
24+
var uniform = require( '@stdlib/random/base/uniform' ).factory;
25+
var filledarrayBy = require( '@stdlib/array/filled-by' );
2526
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2627
var pow = require( '@stdlib/math/base/special/pow' );
27-
var Float64Array = require( '@stdlib/array/float64' );
2828
var pkg = require( './../package.json' ).name;
2929
var dapxsum = require( './../lib/dapxsum.js' );
3030

3131

32+
// VARIABLES //
33+
34+
var rand = uniform( -100.0, 100.0 );
35+
36+
3237
// FUNCTIONS //
3338

3439
/**
@@ -39,13 +44,7 @@ var dapxsum = require( './../lib/dapxsum.js' );
3944
* @returns {Function} benchmark function
4045
*/
4146
function createBenchmark( len ) {
42-
var x;
43-
var i;
44-
45-
x = new Float64Array( len );
46-
for ( i = 0; i < x.length; i++ ) {
47-
x[ i ] = ( randu()*20.0 ) - 10.0;
48-
}
47+
var x = filledarrayBy( len, 'float64', rand );
4948
return benchmark;
5049

5150
function benchmark( b ) {

lib/node_modules/@stdlib/blas/ext/base/dapxsum/benchmark/benchmark.native.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
25-
var randu = require( '@stdlib/random/base/randu' );
25+
var uniform = require( '@stdlib/random/base/uniform' ).factory;
26+
var filledarrayBy = require( '@stdlib/array/filled-by' );
2627
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2728
var pow = require( '@stdlib/math/base/special/pow' );
28-
var Float64Array = require( '@stdlib/array/float64' );
2929
var tryRequire = require( '@stdlib/utils/try-require' );
3030
var pkg = require( './../package.json' ).name;
3131

@@ -36,6 +36,7 @@ var dapxsum = tryRequire( resolve( __dirname, './../lib/dapxsum.native.js' ) );
3636
var opts = {
3737
'skip': ( dapxsum instanceof Error )
3838
};
39+
var rand = uniform( -100.0, 100.0 );
3940

4041

4142
// FUNCTIONS //
@@ -48,13 +49,7 @@ var opts = {
4849
* @returns {Function} benchmark function
4950
*/
5051
function createBenchmark( len ) {
51-
var x;
52-
var i;
53-
54-
x = new Float64Array( len );
55-
for ( i = 0; i < x.length; i++ ) {
56-
x[ i ] = ( randu()*20.0 ) - 10.0;
57-
}
52+
var x = filledarrayBy( len, 'float64', rand );
5853
return benchmark;
5954

6055
function benchmark( b ) {

lib/node_modules/@stdlib/blas/ext/base/dapxsum/benchmark/benchmark.ndarray.js

Original file line numberDiff line numberDiff line change
@@ -21,14 +21,19 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24-
var randu = require( '@stdlib/random/base/randu' );
24+
var uniform = require( '@stdlib/random/base/uniform' ).factory;
25+
var filledarrayBy = require( '@stdlib/array/filled-by' );
2526
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2627
var pow = require( '@stdlib/math/base/special/pow' );
27-
var Float64Array = require( '@stdlib/array/float64' );
2828
var pkg = require( './../package.json' ).name;
2929
var dapxsum = require( './../lib/ndarray.js' );
3030

3131

32+
// VARIABLES //
33+
34+
var rand = uniform( -100.0, 100.0 );
35+
36+
3237
// FUNCTIONS //
3338

3439
/**
@@ -39,13 +44,7 @@ var dapxsum = require( './../lib/ndarray.js' );
3944
* @returns {Function} benchmark function
4045
*/
4146
function createBenchmark( len ) {
42-
var x;
43-
var i;
44-
45-
x = new Float64Array( len );
46-
for ( i = 0; i < x.length; i++ ) {
47-
x[ i ] = ( randu()*20.0 ) - 10.0;
48-
}
47+
var x = filledarrayBy( len, 'float64', rand );
4948
return benchmark;
5049

5150
function benchmark( b ) {

0 commit comments

Comments
 (0)
0