Skip to content

Commit 1873e20

Browse files
authored
Merge branch 'stdlib-js:develop' into lint-errors
2 parents 19a99fc + aab2efb commit 1873e20

File tree

27 files changed

+351
-609
lines changed

27 files changed

+351
-609
lines changed

.github/workflows/autoclose.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,44 @@ jobs:
211211
This pull request has been automatically closed because it has been inactive for an extended period after changes were requested. If you still wish to pursue this contribution, feel free to reopen the pull request or submit a new one.
212212
213213
We appreciate your interest in contributing to stdlib!
214+
215+
# Define a job which closes a pull request if a PR has an inappropriate Git history:
216+
git_history:
217+
218+
# Define job name:
219+
name: 'Check for Git History label'
220+
221+
# Only run this job if the pull request has a specific label:
222+
if: "${{ github.event.label.name == 'autoclose: Git History' }}"
223+
224+
# Define job permissions:
225+
permissions:
226+
contents: read
227+
pull-requests: write
228+
229+
# Define the type of virtual host machine:
230+
runs-on: ubuntu-latest
231+
232+
# Define the sequence of job steps:
233+
steps:
234+
235+
# Close the pull request:
236+
- name: 'Close pull request'
237+
run: gh pr close "$NUMBER" --comment "$BODY"
238+
env:
239+
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
240+
GH_REPO: ${{ github.repository }}
241+
NUMBER: ${{ github.event.pull_request.number }}
242+
BODY: |
243+
Thank you for working on this pull request. However, we cannot accept your contribution due to Git history issues.
244+
245+
Some common issues include:
246+
247+
- Merge conflicts
248+
- Inappropriate commit messages
249+
- Unrelated commits
250+
- Including changes from merged branches that weren't intended for this PR
251+
252+
We recommend opening a new pull request with only the intended changes.
253+
254+
Thank you for your interest in stdlib, and we look forward to your future contributions.

.github/workflows/too_many_good_first_prs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,6 @@ jobs:
6969
- name: 'Prevent contributors from opening too many "Good First PR"s'
7070
env:
7171
PR_NUMBER: ${{ github.event.pull_request.number }}
72+
GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
7273
run: |
7374
. "$GITHUB_WORKSPACE/.github/workflows/scripts/rate_limit_contributions" $PR_NUMBER

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ Yaswanth Kosuru <[email protected]>
139139
Yernar Yergaziyev <[email protected]>
140140
Yugal Kaushik <[email protected]>
141141
Yuvi Mittal <[email protected]>
142+
142143
ekambains <[email protected]>
143144
fadiothman22 <[email protected]>
144145
olenkabilonizhka <[email protected]>

lib/node_modules/@stdlib/_tools/eslint/rules/no-nested-require/examples/index.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ result = linter.verify( code, {
3636
});
3737
console.log( result );
3838
/* =>
39-
[
40-
{
41-
'ruleId': 'no-nested-require',
42-
'severity': 2,
43-
'message': 'do not use nested property access for require() expressions',
44-
'line': 2,
45-
'column': 15,
46-
'nodeType': 'CallExpression',
47-
'source': 'var special = require( \'@stdlib/math\' ).base.special;',
48-
'endLine': 2,
49-
'endColumn': 29
50-
}
51-
]
39+
[
40+
{
41+
'ruleId': 'no-nested-require',
42+
'severity': 2,
43+
'message': 'do not use nested property access for require() expressions',
44+
'line': 2,
45+
'column': 15,
46+
'nodeType': 'CallExpression',
47+
'source': 'var special = require( \'@stdlib/math\' ).base.special;',
48+
'endLine': 2,
49+
'endColumn': 29
50+
}
51+
]
5252
*/
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"usernames": [],
3-
"protocol": "https",
4-
"hostname": "api.github.com",
5-
"port": 443,
6-
"pathname": "/",
7-
"page": 1,
8-
"last_page": 1,
9-
"per_page": 1,
10-
"method": "GET",
11-
"useragent": "https://github.com/stdlib-js/stdlib/@stdlib/_tools/github/user-details",
12-
"accept": "application/vnd.github.v3+json"
2+
"usernames": [],
3+
"protocol": "https",
4+
"hostname": "api.github.com",
5+
"port": 443,
6+
"pathname": "/",
7+
"page": 1,
8+
"last_page": 1,
9+
"per_page": 1,
10+
"method": "GET",
11+
"useragent": "https://github.com/stdlib-js/stdlib/@stdlib/_tools/github/user-details",
12+
"accept": "application/vnd.github.v3+json"
1313
}

lib/node_modules/@stdlib/blas/base/wasm/zswap/README.md

Lines changed: 10 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,13 @@ Interchanges two complex double-precision floating-point vectors.
3636

3737
```javascript
3838
var Complex128Array = require( '@stdlib/array/complex128' );
39-
var real = require( '@stdlib/complex/float64/real' );
40-
var imag = require( '@stdlib/complex/float64/imag' );
4139

4240
var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
4341
var y = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
4442

4543
zswap.main( x.length, x, 1, y, 1 );
46-
47-
var z = y.get( 0 );
48-
// returns <Complex128>
49-
50-
var re = real( z );
51-
// returns 1.0
52-
53-
var im = imag( z );
54-
// returns 2.0
55-
56-
z = x.get( 0 );
57-
// returns <Complex128>
58-
59-
re = real( z );
60-
// returns 0.0
61-
62-
im = imag( z );
63-
// returns 0.0
44+
// x => <Complex128Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
45+
// y => <Complex128Array>[ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]
6446
```
6547

6648
The function has the following parameters:
@@ -75,31 +57,13 @@ The `N` and stride parameters determine how values from `x` are interchanged wit
7557

7658
```javascript
7759
var Complex128Array = require( '@stdlib/array/complex128' );
78-
var real = require( '@stdlib/complex/float64/real' );
79-
var imag = require( '@stdlib/complex/float64/imag' );
8060

8161
var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
8262
var y = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
8363

8464
zswap.main( 2, x, -2, y, 1 );
85-
86-
var z = y.get( 0 );
87-
// returns <Complex128>
88-
89-
var re = real( z );
90-
// returns 5.0
91-
92-
var im = imag( z );
93-
// returns 6.0
94-
95-
z = x.get( 0 );
96-
// returns <Complex128>
97-
98-
re = real( z );
99-
// returns 0.0
100-
101-
im = imag( z );
102-
// returns 0.0
65+
// x => <Complex128Array>[ 0.0, 0.0, 3.0, 4.0, 0.0, 0.0, 7.0, 8.0 ]
66+
// y => <Complex128Array>[ 5.0, 6.0, 1.0, 2.0, 0.0, 0.0, 0.0, 0.0 ]
10367
```
10468

10569
Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
@@ -108,8 +72,6 @@ Note that indexing is relative to the first index. To introduce an offset, use [
10872

10973
```javascript
11074
var Complex128Array = require( '@stdlib/array/complex128' );
111-
var real = require( '@stdlib/complex/float64/real' );
112-
var imag = require( '@stdlib/complex/float64/imag' );
11375

11476
// Initial arrays...
11577
var x0 = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
@@ -121,24 +83,8 @@ var y1 = new Complex128Array( y0.buffer, y0.BYTES_PER_ELEMENT*2 ); // start at 3
12183

12284
// Interchange every other value from `x1` into `y1` in reverse order...
12385
zswap.main( 2, x1, -2, y1, 1 );
124-
125-
var z = y0.get( 2 );
126-
// returns <Complex128>
127-
128-
var re = real( z );
129-
// returns 7.0
130-
131-
var im = imag( z );
132-
// returns 8.0
133-
134-
z = x0.get( 1 );
135-
// returns <Complex128>
136-
137-
re = real( z );
138-
// returns 0.0
139-
140-
im = imag( z );
141-
// returns 0.0
86+
// x0 => <Complex128Array>[ 1.0, 2.0, 0.0, 0.0, 5.0, 6.0, 0.0, 0.0 ]
87+
// y0 => <Complex128Array>[ 0.0, 0.0, 0.0, 0.0, 7.0, 8.0, 3.0, 4.0 ]
14288
```
14389

14490
#### zswap.ndarray( N, x, strideX, offsetX, y, strideY, offsetY )
@@ -147,31 +93,13 @@ Interchanges two complex double-precision floating-point vectors using alternati
14793

14894
```javascript
14995
var Complex128Array = require( '@stdlib/array/complex128' );
150-
var real = require( '@stdlib/complex/float64/real' );
151-
var imag = require( '@stdlib/complex/float64/imag' );
15296

15397
var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
15498
var y = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
15599

156100
zswap.ndarray( x.length, x, 1, 0, y, 1, 0 );
157-
158-
var z = y.get( 0 );
159-
// returns <Complex128>
160-
161-
var re = real( z );
162-
// returns 1.0
163-
164-
var im = imag( z );
165-
// returns 2.0
166-
167-
z = x.get( 0 );
168-
// returns <Complex128>
169-
170-
re = real( z );
171-
// returns 0.0
172-
173-
im = imag( z );
174-
// returns 0.0
101+
// x => <Complex128Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
102+
// y => <Complex128Array>[ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]
175103
```
176104

177105
The function has the following additional parameters:
@@ -183,31 +111,13 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the
183111

184112
```javascript
185113
var Complex128Array = require( '@stdlib/array/complex128' );
186-
var real = require( '@stdlib/complex/float64/real' );
187-
var imag = require( '@stdlib/complex/float64/imag' );
188114

189115
var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
190116
var y = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
191117

192118
zswap.ndarray( 2, x, 2, 1, y, -1, y.length-1 );
193-
194-
var z = y.get( y.length-1 );
195-
// returns <Complex128>
196-
197-
var re = real( z );
198-
// returns 3.0
199-
200-
var im = imag( z );
201-
// returns 4.0
202-
203-
z = x.get( x.length-1 );
204-
// returns <Complex128>
205-
206-
re = real( z );
207-
// returns 0.0
208-
209-
im = imag( z );
210-
// returns 0.0
119+
// x => <Complex128Array>[ 1.0, 2.0, 0.0, 0.0, 5.0, 6.0, 0.0, 0.0 ]
120+
// y => <Complex128Array>[ 0.0, 0.0, 0.0, 0.0, 7.0, 8.0, 3.0, 4.0 ]
211121
```
212122

213123
* * *

lib/node_modules/@stdlib/blas/base/wasm/zswap/docs/repl.txt

Lines changed: 20 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -38,48 +38,30 @@
3838
> var x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
3939
> var y = new {{alias:@stdlib/array/complex128}}( [ 6.0, 7.0, 8.0, 9.0 ] );
4040
> {{alias}}.main( x.length, x, 1, y, 1 );
41-
> var z = y.get( 0 );
42-
> var re = {{alias:@stdlib/complex/float64/real}}( z )
43-
1.0
44-
> var im = {{alias:@stdlib/complex/float64/imag}}( z )
45-
2.0
46-
> z = x.get( 0 );
47-
> re = {{alias:@stdlib/complex/float64/real}}( z )
48-
6.0
49-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
50-
7.0
41+
> x
42+
<Complex128Array>[ 6.0, 7.0, 8.0, 9.0 ]
43+
> y
44+
<Complex128Array>[ 1.0, 2.0, 3.0, 4.0 ]
5145

5246
// Advanced indexing:
5347
> x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
5448
> y = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
5549
> {{alias}}.main( 2, x, -2, y, 1 );
56-
> z = y.get( 0 );
57-
> re = {{alias:@stdlib/complex/float64/real}}( z )
58-
5.0
59-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
60-
6.0
61-
> z = x.get( 0 );
62-
> re = {{alias:@stdlib/complex/float64/real}}( z )
63-
0.0
64-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
65-
0.0
50+
> x
51+
<Complex128Array>[ 0.0, 0.0, 3.0, 4.0, 0.0, 0.0, 7.0, 8.0 ]
52+
> y
53+
<Complex128Array>[ 5.0, 6.0, 1.0, 2.0, 0.0, 0.0, 0.0, 0.0 ]
6654

6755
// Using typed array views:
6856
> var x0 = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
6957
> var y0 = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
7058
> var x1 = new {{alias:@stdlib/array/complex128}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
7159
> var y1 = new {{alias:@stdlib/array/complex128}}( y0.buffer, y0.BYTES_PER_ELEMENT*1 );
7260
> {{alias}}.main( 2, x1, -1, y1, 1 );
73-
> z = y0.get( 2 );
74-
> re = {{alias:@stdlib/complex/float64/real}}( z )
75-
3.0
76-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
77-
4.0
78-
> z = x0.get( 1 );
79-
> re = {{alias:@stdlib/complex/float64/real}}( z )
80-
0.0
81-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
82-
0.0
61+
> x0
62+
<Complex128Array>[ 1.0, 2.0, 0.0, 0.0, 0.0, 0.0 ]
63+
> y0
64+
<Complex128Array>[ 0.0, 0.0, 5.0, 6.0, 3.0, 4.0 ]
8365

8466

8567
{{alias}}.ndarray( N, x, strideX, offsetX, y, strideY, offsetY )
@@ -124,31 +106,19 @@
124106
> var x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
125107
> var y = new {{alias:@stdlib/array/complex128}}( [ 6.0, 7.0, 8.0, 9.0 ] );
126108
> {{alias}}.ndarray( x.length, x, 1, 0, y, 1, 0 );
127-
> var z = y.get( 0 );
128-
> var re = {{alias:@stdlib/complex/float64/real}}( z )
129-
1.0
130-
> var im = {{alias:@stdlib/complex/float64/imag}}( z )
131-
2.0
132-
> z = x.get( 0 );
133-
> re = {{alias:@stdlib/complex/float64/real}}( z )
134-
6.0
135-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
136-
7.0
109+
> x
110+
<Complex128Array>[ 6.0, 7.0, 8.0, 9.0 ]
111+
> y
112+
<Complex128Array>[ 1.0, 2.0, 3.0, 4.0 ]
137113

138114
// Advanced indexing:
139115
> x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
140116
> y = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
141117
> {{alias}}.ndarray( 2, x, 2, 1, y, -1, y.length-1 );
142-
> z = y.get( y.length-1 );
143-
> re = {{alias:@stdlib/complex/float64/real}}( z )
144-
3.0
145-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
146-
4.0
147-
> z = x.get( 1 );
148-
> re = {{alias:@stdlib/complex/float64/real}}( z )
149-
0.0
150-
> im = {{alias:@stdlib/complex/float64/imag}}( z )
151-
0.0
118+
> x
119+
<Complex128Array>[ 1.0, 2.0, 0.0, 0.0, 5.0, 6.0, 0.0, 0.0 ]
120+
> y
121+
<Complex128Array>[ 0.0, 0.0, 0.0, 0.0, 7.0, 8.0, 3.0, 4.0 ]
152122

153123

154124
{{alias}}.Module( memory )

0 commit comments

Comments
 (0)