8000 Auto-generated commit · stdlib-js/ndarray-base-for-each@a6c581b · GitHub
[go: up one dir, main page]

Skip to content

Commit a6c581b

Browse files
committed
Auto-generated commit
1 parent 2f13f26 commit a6c581b

24 files changed

+139
-111
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-04-14)
7+
## Unreleased (2025-05-08)
88

99
<section class="bug-fixes">
1010

1111
### Bug Fixes
1212

13+
- [`f10dd8c`](https://github.com/stdlib-js/stdlib/commit/f10dd8ccbd1c245467d156a1b87f5eb2ba47e0ad) - use resolved order when computing loop variables
1314
- [`4e6b2eb`](https://github.com/stdlib-js/stdlib/commit/4e6b2eb39e01d193302cd93ebf93dd2f42c71291) - update type for indices
1415
- [`c57d1d8`](https://github.com/stdlib-js/stdlib/commit/c57d1d880a32cfaff0c57744c81ef641640cddef) - return subscripts from perspective of ndarray view, not buffer
1516

@@ -23,6 +24,7 @@
2324

2425
<details>
2526

27+
- [`f10dd8c`](https://github.com/stdlib-js/stdlib/commit/f10dd8ccbd1c245467d156a1b87f5eb2ba47e0ad) - **fix:** use resolved order when computing loop variables _(by Athan Reines)_
2628
- [`abf0407`](https://github.com/stdlib-js/stdlib/commit/abf040787f6598438b0100a729a8331b7f80f62f) - **chore:** resolve lint errors in TS files _(by Philipp Burckhardt)_
2729
- [`e261bc2`](https://github.com/stdlib-js/stdlib/commit/e261bc2c64bb3ac5236abc447b9ae3f40acf31ab) - **docs:** fix strides _(by Athan Reines)_
2830
- [`22c4d29`](https://github.com/stdlib-js/stdlib/commit/22c4d29898e2b5bb4cb071a6b7f62536027eaf28) - **docs:** remove blank line _(by Athan Reines)_

CONTRIBUTORS

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,18 @@ Dorrin Sotoudeh <dorrinsotoudeh123@gmail.com>
5151
EuniceSim142 <77243938+EuniceSim142@users.noreply.github.com>
5252
Frank Kovacs <fran70kk@gmail.com>
5353
GK Bishnoi <gkishan1kyt@gmail.com>
54+
GURU PRASAD SHARMA <168292003+GURUPRASADSHARMA@users.noreply.github.com>
5455
Gaurav <gaurav70380@gmail.com>
5556
Gautam sharma <gautamkrishnasharma1@gmail.com>
57+
Girish Garg <garggirish2020@gmail.com>
5658
Golden Kumar <103646877+AuenKr@users.noreply.github.com>
5759
Gunj Joshi <gunjjoshi8372@gmail.com>
5860
Gururaj Gurram <gururajgurram1512@gmail.com>
5961
Haroon Rasheed <51189276+haroon26@users.noreply.github.com>
60-
Harsh <149176984+hrshya@users.noreply.github.com>
62+
Harsh <harshyadav6078@gmail.com>
6163
HarshaNP <96897754+GittyHarsha@users.noreply.github.com>
6264
Harshita Kalani <harshitakalani02@gmail.com>
65+
Hemang Choudhary <coehemang@gmail.com>
6366
Hemant M Mehta <92446645+hemantmm@users.noreply.github.com>
6467
Hridyanshu <124202756+HRIDYANSHU054@users.noreply.github.com>
6568
Jaimin Godhani <112328542+Jai0401@users.noreply.github.com>
@@ -85,6 +88,7 @@ Kohantika Nath <145763549+kohantikanath@users.noreply.github.com>
8588
Krishnam Agarwal <83017176+888krishnam@users.noreply.github.com>
8689
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
8790
Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com>
91+
Lalit Narayan Yadav <162928571+LalitNarayanYadav@users.noreply.github.com>
8892
Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com>
8993
MANI <77221000+Eternity0207@users.noreply.github.com>
9094
Mahfuza Humayra Mohona <mhmohona@gmail.com>
@@ -105,6 +109,7 @@ Naveen Kumar <stupiddint@gmail.com>
105109
Neeraj Pathak <neerajrpathak710@gmail.com>
106110
NirvedMishra <139633597+NirvedMishra@users.noreply.github.com>
107111
Nishant Shinde <97207366+nishant-s7@users.noreply.github.com>
112+
Nishant singh <38534128+Nishantsingh11@users.noreply.github.com>
108113
Nishchay Rajput <121144841+NishchayRajput@users.noreply.github.com>
109114
Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
110115
Nourhan Hasan <109472010+TheNourhan@users.noreply.github.com>
@@ -177,12 +182,15 @@ Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com>
177182
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
178183
Yugal Kaushik <yugalkaushik14@gmail.com>
179184
Yuvi Mittal <128018763+yuvi-mittal@users.noreply.github.com>
185+
devshree-bhati <147095250+devshree-bhati@users.noreply.github.com>
180186
ditsu <170345142+ditsus@users.noreply.github.com>
181187
ekambains <bainsinbusiness@gmail.com>
182188
fadiothman22 <48636283+fadiothman22@users.noreply.github.com>
189+
iraandrushko <71790513+iraandrushko@users.noreply.github.com>
183190
lohithganni <116790357+lohithganni@users.noreply.github.com>
184191
olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com>
185192
pranav-1720 <123018993+pranav-1720@users.noreply.github.com>
186193
rahulrangers <127782777+rahulrangers@users.noreply.github.com>
187194
rainn <88160429+AmCodesLame@users.noreply.github.com>
188195
rei2hu <reimu@reimu.ws>
196+
zhanggy <geodaoyu@foxmail.com>

dist/index.js

Lines changed: 87 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/10d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
// MODULES //
2424

25+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2526
var zeroTo = require( '@stdlib/array-base-zero-to' );
2627
var reverse = require( '@stdlib/array-base-reverse' );
2728
var take = require( '@stdlib/array-base-take-indexed' );
@@ -119,7 +120,7 @@ function forEach10d( x, fcn, thisArg ) { // eslint-disable-line max-statements
119120
sh = x.shape;
120121
sx = x.strides;
121122
idx = zeroTo( sh.length );
122-
if ( x.order === 'row-major' ) {
123+
if ( strides2order( sx ) === 1 ) {
123124
// For row-major ndarrays, the last dimensions have the fastest changing indices...
124125
S0 = sh[ 9 ];
125126
S1 = sh[ 8 ];

lib/10d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
// MODULES //
2424

25+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2526
var zeroTo = require( '@stdlib/array-base-zero-to' );
2627
var reverse = require( '@stdlib/array-base-reverse' );
2728
var take = require( '@stdlib/array-base-take-indexed' );
@@ -134,7 +135,7 @@ function forEach10d( x, fcn, thisArg ) { // eslint-disable-line max-statements
134135
sh = x.shape;
135136
sx = x.strides;
136137
idx = zeroTo( sh.length );
137-
if ( x.order === 'row-major' ) {
138+
if ( strides2order( sx ) === 1 ) {
138139
// For row-major ndarrays, the last dimensions have the fastest changing indices...
139140
S0 = sh[ 9 ];
140141
S1 = sh[ 8 ];

lib/2d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2324
var zeroTo = require( '@stdlib/array-base-zero-to' );
2425
var reverse = require( '@stdlib/array-base-reverse' );
2526
var take = require( '@stdlib/array-base-take-indexed' );
@@ -93,7 +94,7 @@ function forEach2d( x, fcn, thisArg ) {
9394
sh = x.shape;
9495
sx = x.strides;
9596
idx = zeroTo( sh.length );
96-
if ( x.order === 'row-major' ) {
97+
if ( strides2order( sx ) === 1 ) {
9798
// For row-major ndarrays, the last dimensions have the fastest changing indices...
9899
S0 = sh[ 1 ];
99100
S1 = sh[ 0 ];

lib/2d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2324
var zeroTo = require( '@stdlib/array-base-zero-to' );
2425
var reverse = require( '@stdlib/array-base-reverse' );
2526
var take = require( '@stdlib/array-base-take-indexed' );
@@ -108,7 +109,7 @@ function forEach2d( x, fcn, thisArg ) {
108109
sh = x.shape;
109110
sx = x.strides;
110111
idx = zeroTo( sh.length );
111-
if ( x.order === 'row-major' ) {
112+
if ( strides2order( sx ) === 1 ) {
112113
// For row-major ndarrays, the last dimensions have the fastest changing indices...
113114
S0 = sh[ 1 ];
114115
S1 = sh[ 0 ];

lib/3d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2324
var zeroTo = require( '@stdlib/array-base-zero-to' );
2425
var reverse = require( '@stdlib/array-base-reverse' );
2526
var take = require( '@stdlib/array-base-take-indexed' );
@@ -96,7 +97,7 @@ function forEach3d( x, fcn, thisArg ) {
9697
sh = x.shape;
9798
sx = x.strides;
9899
idx = zeroTo( sh.length );
99-
if ( x.order === 'row-major' ) {
100+
if ( strides2order( sx ) === 1 ) {
100101
// For row-major ndarrays, the last dimensions have the fastest changing indices...
101102
S0 = sh[ 2 ];
102103
S1 = sh[ 1 ];

lib/3d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2324
var zeroTo = require( '@stdlib/array-base-zero-to' );
2425
var reverse = require( '@stdlib/array-base-reverse' );
2526
var take = require( '@stdlib/array-base-take-indexed' );
@@ -111,7 +112,7 @@ function forEach3d( x, fcn, thisArg ) {
111112
sh = x.shape;
112113
sx = x.strides;
113114
idx = zeroTo( sh.length );
114-
if ( x.order === 'row-major' ) {
115+
if ( strides2order( sx ) === 1 ) {
115116
// For row-major ndarrays, the last dimensions have the fastest changing indices...
116117
S0 = sh[ 2 ];
117118
S1 = sh[ 1 ];

lib/4d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2324
var zeroTo = require( '@stdlib/array-base-zero-to' );
2425
var reverse = require( '@stdlib/array-base-reverse' );
2526
var take = require( '@stdlib/array-base-take-indexed' );
@@ -99,7 +100,7 @@ function forEach4d( x, fcn, thisArg ) {
99100
sh = x.shape;
100101
sx = x.strides;
101102
idx = zeroTo( sh.length );
102-
if ( x.order === 'row-major' ) {
103+
if ( strides2order( sx ) === 1 ) {
103104
// For row-major ndarrays, the last dimensions have the fastest changing indices...
104105
S0 = sh[ 3 ];
105106
S1 = sh[ 2 ];

lib/4d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2324
var zeroTo = require( '@stdlib/array-base-zero-to' );
2425
var reverse = require( '@stdlib/array-base-reverse' );
2526
var take = require( '@stdlib/array-base-take-indexed' );
@@ -114,7 +115,7 @@ function forEach4d( x, fcn, thisArg ) {
114115
sh = x.shape;
115116
sx = x.strides;
116117
idx = zeroTo( sh.length );
117-
if ( x.order === 'row-major' ) {
118+
if ( strides2order( sx ) === 1 ) {
118119
// For row-major ndarrays, the last dimensions have the fastest changing indices...
119120
S0 = sh[ 3 ];
120121
S1 = sh[ 2 ];

lib/5d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2324
var zeroTo = require( '@stdlib/array-base-zero-to' );
2425
var reverse = require( '@stdlib/array-base-reverse' );
2526
var take = require( '@stdlib/array-base-take-indexed' );
@@ -102,7 +103,7 @@ function forEach5d( x, fcn, thisArg ) {
102103
sh = x.shape;
103104
sx = x.strides;
104105
idx = zeroTo( sh.length );
105-
if ( x.order === 'row-major' ) {
106+
if ( strides2order( sx ) === 1 ) {
106107
// For row-major ndarrays, the last dimensions have the fastest changing indices...
107108
S0 = sh[ 4 ];
108109
S1 = sh[ 3 ];

lib/5d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2324
var zeroTo = require( '@stdlib/array-base-zero-to' );
2425
var reverse = require( '@stdlib/array-base-reverse' );
2526
var take = require( '@stdlib/array-base-take-indexed' );
@@ -117,7 +118,7 @@ function forEach5d( x, fcn, thisArg ) {
117118
sh = x.shape;
118119
sx = x.strides;
119120
idx = zeroTo( sh.length );
120-
if ( x.order === 'row-major' ) {
121+
if ( strides2order( sx ) === 1 ) {
121122
// For row-major ndarrays, the last dimensions have the fastest changing indices...
122123
S0 = sh[ 4 ];
123124
S1 = sh[ 3 ];

lib/6d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
// MODULES //
2424

25+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2526
var zeroTo = require( '@stdlib/array-base-zero-to' );
2627
var reverse = require( '@stdlib/array-base-reverse' );
2728
var take = require( '@stdlib/array-base-take-indexed' );
@@ -107,7 +108,7 @@ function forEach6d( x, fcn, thisArg ) {
107108
sh = x.shape;
108109
sx = x.strides;
109110
idx = zeroTo( sh.length );
110-
if ( x.order === 'row-major' ) {
111+
if ( strides2order( sx ) === 1 ) {
111112
// For row-major ndarrays, the last dimensions have the fastest changing indices...
112113
S0 = sh[ 5 ];
113114
S1 = sh[ 4 ];

lib/6d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
// MODULES //
2424

25+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2526
var zeroTo = require( '@stdlib/array-base-zero-to' );
2627
var reverse = require( '@stdlib/array-base-reverse' );
2728
var take = require( '@stdlib/array-base-take-indexed' );
@@ -122,7 +123,7 @@ function forEach6d( x, fcn, thisArg ) {
122123
sh = x.shape;
123124
sx = x.strides;
124125
idx = zeroTo( sh.length );
125-
if ( x.order === 'row-major' ) {
126+ 57AE
if ( strides2order( sx ) === 1 ) {
126127
// For row-major ndarrays, the last dimensions have the fastest changing indices...
127128
S0 = sh[ 5 ];
128129
S1 = sh[ 4 ];

lib/7d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
// MODULES //
2424

25+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2526
var zeroTo = require( '@stdlib/array-base-zero-to' );
2627
var reverse = require( '@stdlib/array-base-reverse' );
2728
var take = require( '@stdlib/array-base-take-indexed' );
@@ -110,7 +111,7 @@ function forEach7d( x, fcn, thisArg ) {
110111
sh = x.shape;
111112
sx = x.strides;
112113
idx = zeroTo( sh.length );
113-
if ( x.order === 'row-major' ) {
114+
if ( strides2order( sx ) === 1 ) {
114115
// For row-major ndarrays, the last dimensions have the fastest changing indices...
115116
S0 = sh[ 6 ];
116117
S1 = sh[ 5 ];

lib/7d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
// MODULES //
2424

25+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2526
var zeroTo = require( '@stdlib/array-base-zero-to' );
2627
var reverse = require( '@stdlib/array-base-reverse' );
2728
var take = require( '@stdlib/array-base-take-indexed' );
@@ -125,7 +126,7 @@ function forEach7d( x, fcn, thisArg ) {
125126
sh = x.shape;
126127
sx = x.strides;
127128
idx = zeroTo( sh.length );
128-
if ( x.order === 'row-major' ) {
129+
if ( strides2order( sx ) === 1 ) {
129130 F438
// For row-major ndarrays, the last dimensions have the fastest changing indices...
130131
S0 = sh[ 6 ];
131132
S1 = sh[ 5 ];

lib/8d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
// MODULES //
2424

25+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2526
var zeroTo = require( '@stdlib/array-base-zero-to' );
2627
var reverse = require( '@stdlib/array-base-reverse' );
2728
var take = require( '@stdlib/array-base-take-indexed' );
@@ -113,7 +114,7 @@ function forEach8d( x, fcn, thisArg ) {
113114
sh = x.shape;
114115
sx = x.strides;
115116
idx = zeroTo( sh.length );
116-
if ( x.order === 'row-major' ) {
117+
if ( strides2order( sx ) === 1 ) {
117118
// For row-major ndarrays, the last dimensions have the fastest changing indices...
118119
S0 = sh[ 7 ];
119120
S1 = sh[ 6 ];

lib/8d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
// MODULES //
2424

25+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2526
var zeroTo = require( '@stdlib/array-base-zero-to' );
2627
var reverse = require( '@stdlib/array-base-reverse' );
2728
var take = require( '@stdlib/array-base-take-indexed' );
@@ -128,7 +129,7 @@ function forEach8d( x, fcn, thisArg ) {
128129
sh = x.shape;
129130
sx = x.strides;
130131
idx = zeroTo( sh.length );
131-
if ( x.order === 'row-major' ) {
132+
if ( strides2order( sx ) === 1 ) {
132133
// For row-major ndarrays, the last dimensions have the fastest changing indices...
133134
S0 = sh[ 7 ];
134135
S1 = sh[ 6 ];

lib/9d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
// MODULES //
2424

25+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2526
var zeroTo = require( '@stdlib/array-base-zero-to' );
2627
var reverse = require( '@stdlib/array-base-reverse' );
2728
var take = require( '@stdlib/array-base-take-indexed' );
@@ -116,7 +117,7 @@ function forEach9d( x, fcn, thisArg ) {
116117
sh = x.shape;
117118
sx = x.strides;
118119
idx = zeroTo( sh.length );
119-
if ( x.order === 'row-major' ) {
120+
if ( strides2order( sx ) === 1 ) {
120121
// For row-major ndarrays, the last dimensions have the fastest changing indices...
121122
S0 = sh[ 8 ];
122123
S1 = sh[ 7 ];

lib/9d_accessors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
// MODULES //
2424

25+
var strides2order = require( '@stdlib/ndarray-base-strides2order' );
2526
var zeroTo = require( '@stdlib/array-base-zero-to' );
2627
var reverse = require( '@stdlib/array-base-reverse' );
2728
var take = require( '@stdlib/array-base-take-indexed' );
@@ -131,7 +132,7 @@ function forEach9d( x, fcn, thisArg ) {
131132
sh = x.shape;
132133
sx = x.strides;
133134
idx = zeroTo( sh.length );
134-
if ( x.order === 'row-major' ) {
135+
if ( strides2order( sx ) === 1 ) {
135136
// For row-major ndarrays, the last dimensions have the fastest changing indices...
136137
S0 = sh[ 8 ];
137138
S1 = sh[ 7 ];

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"@stdlib/ndarray-base-nullary-loop-interchange-order": "^0.2.2",
4747
"@stdlib/ndarray-base-nullary-tiling-block-size": "^0.2.2",
4848
"@stdlib/ndarray-base-numel": "^0.2.2",
49+
"@stdlib/ndarray-base-strides2order": "^0.2.2",
4950
"@stdlib/ndarray-base-vind2bind": "^0.2.2",
5051
"@stdlib/types": "^0.4.3"
5152
},

0 commit comments

Comments
 (0)
0