Skip to content

Commit 5b54ed3

Browse files
committed
Auto-generated commit
1 parent 111f26c commit 5b54ed3

File tree

12 files changed

+141
-60
lines changed

12 files changed

+141
-60
lines changed

.github/.keepalive

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

.gitignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,12 @@ jsconfig.json
188188
# Other editor files #
189189
######################
190190
.idea/
191-
192-
# Cursor #
193-
##########
191+
.cursor
194192
.cursorignore
193+
.windsurfrules
194+
.clinerules
195+
196+
# AI coding agents #
197+
####################
198+
CLAUDE.md
199+
GEMINI.md

CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,50 @@
22

33
> Package changelog.
44
5+
<section class="release" id="unreleased">
6+
7+
## Unreleased (2025-09-19)
8+
9+
<section class="features">
10+
11+
### Features
12+
13+
- [`ae21126`](https://github.com/stdlib-js/stdlib/commit/ae2112615cd460c39161a41c32d18b7ab600c885) - add support for struct arrays
14+
15+
</section>
16+
17+
<!-- /.features -->
18+
19+
<section class="commits">
20+
21+
### Commits
22+
23+
<details>
24+
25+
- [`ae21126`](https://github.com/stdlib-js/stdlib/commit/ae2112615cd460c39161a41c32d18b7ab600c885) - **feat:** add support for struct arrays _(by Athan Reines)_
26+
27+
</details>
28+
29+
</section>
30+
31+
<!-- /.commits -->
32+
33+
<section class="contributors">
34+
35+
### Contributors
36+
37+
A total of 1 person contributed to this release. Thank you to this contributor:
38+
39+
- Athan Reines
40+
41+
</section>
42+
43+
<!-- /.contributors -->
44+
45+
</section>
46+
47+
<!-- /.release -->
48+
549
<section class="release" id="v0.2.2">
650

751
## 0.2.2 (2024-07-29)

CONTRIBUTORS

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,49 @@ Abdelrahman Samir <[email protected]>
99
Abdul Kaium <[email protected]>
1010
Abhay Punia <[email protected]>
1111
Abhijit Raut <[email protected]>
12+
Abhishek G <[email protected]>
1213
Abhishek Jain <[email protected]>
1314
Adarsh Palaskar <[email protected]>
1415
Aditya Sapra <[email protected]>
16+
Aditya Singh <[email protected]>
1517
Ahmed Atwa <[email protected]>
1618
Ahmed Kashkoush <[email protected]>
1719
Ahmed Khaled <[email protected]>
1820
Aksshay Balasubramanian <[email protected]>
1921
Aleksandr <[email protected]>
2022
Ali Salesi <[email protected]>
21-
AlyAbdelmoneim <[email protected]>
23+
Aly Abdelmoneim <[email protected]>
2224
Aman Bhansali <[email protected]>
2325
AmanBhadkariya <[email protected]>
26+
Amisha Chhajed <[email protected]>
2427
Amit Jimiwal <[email protected]>
28+
Anmol Sah <[email protected]>
2529
Annamalai Prabu <[email protected]>
2630
Anshu Kumar <[email protected]>
2731
Anshu Kumar <[email protected]>
32+
Anshuman Singh <[email protected]>
2833
Anudeep Sanapala <[email protected]>
34+
Arihant Pal <[email protected]>
35+
Aryan Bhirud <[email protected]>
36+
2937
Athan Reines <[email protected]>
38+
Atharva Patil <[email protected]>
3039
3140
Bhavishy Agrawal <[email protected]>
3241
Brendan Graetz <[email protected]>
3342
Bruno Fenzl <[email protected]>
3443
Bryan Elee <[email protected]>
3544
Chinmay Joshi <[email protected]>
3645
Christopher Dambamuromo <[email protected]>
46+
DUDHAT HEMIL PRAVINKUMAR <[email protected]>
3747
48+
Daniel Hernandez Gomez <[email protected]>
3849
Daniel Killenberger <[email protected]>
3950
Daniel Yu <[email protected]>
4051
Debashis Maharana <[email protected]>
4152
Deep Trivedi <[email protected]>
4253
Deepak Singh <[email protected]>
54+
Deepak Singh <[email protected]>
4355
Desh Deepak Kant <[email protected]>
4456
4557
Dhanyabad behera <[email protected]>
@@ -55,12 +67,15 @@ Frank Kovacs <[email protected]>
5567
GK Bishnoi <[email protected]>
5668
GURU PRASAD SHARMA <[email protected]>
5769
70+
Gaurav Kaushik <[email protected]>
5871
Gautam Kaushik <[email protected]>
5972
Gautam sharma <[email protected]>
73+
6074
Girish Garg <[email protected]>
6175
Golden Kumar <[email protected]>
6276
Gunj Joshi <[email protected]>
6377
Gururaj Gurram <[email protected]>
78+
Harishchandra Reddy <[email protected]>
6479
Haroon Rasheed <[email protected]>
6580
6681
@@ -93,6 +108,7 @@ Krishnam Agarwal <[email protected]>
93108
Krishnendu Das <[email protected]>
94109
Kshitij-Dale <[email protected]>
95110
Lalit Narayan Yadav <[email protected]>
111+
Lokesh Ranjan <[email protected]>
96112
Lovelin Dhoni J B <[email protected]>
97113
98114
Mahfuza Humayra Mohona <[email protected]>
@@ -108,6 +124,8 @@ Momtchil Momtchev <[email protected]>
108124
Muhammad Haris <[email protected]>
109125
Muhammad Taaha Tariq <[email protected]>
110126
Muhmmad Saad <[email protected]>
127+
NEEKUorAAYUSH <[email protected]>
128+
Nakul Krishnakumar <[email protected]>
111129
Naresh Jagadeesan <[email protected]>
112130
Naveen Kumar <[email protected]>
113131
Neeraj Pathak <[email protected]>
@@ -120,7 +138,10 @@ Nourhan Hasan <[email protected]>
120138
Ognjen Jevremović <[email protected]>
121139
Oneday12323 <[email protected]>
122140
Ori Miles <[email protected]>
141+
Payal Goswami <[email protected]>
123142
Philipp Burckhardt <[email protected]>
143+
Pierre Forstmann <[email protected]>
144+
Pradyumn Prasad <[email protected]>
124145
Prajjwal Bajpai <[email protected]>
125146
Prajwal Kulkarni <[email protected]>
126147
Pranav Goswami <[email protected]>
@@ -149,25 +170,32 @@ Ruthwik Chikoti <[email protected]>
149170
Ryan Seal <[email protected]>
150171
Rylan Yang <[email protected]>
151172
SAHIL KUMAR <[email protected]>
173+
SAUJANYA MAGARDE <[email protected]>
152174
SHIVAM YADAV <[email protected]>
153175
Sachin Raj <[email protected]>
154176
Sahil Goyal <[email protected]>
155177
Sai Avinash <[email protected]>
156178
Sai Srikar Dumpeti <[email protected]>
157179
Sanchay Ketan Sinha <[email protected]>
158180
Sarthak Paandey <[email protected]>
181+
Satyajeet Chavan <[email protected]>
159182
Saurabh Singh <[email protected]>
183+
Seth-Banker <[email protected]>
160184
Seyyed Parsa Neshaei <[email protected]>
161185
Shabareesh Shetty <[email protected]>
162186
Shashank Shekhar Singh <[email protected]>
187+
Shaswata Panda <[email protected]>
163188
Shivam Ahir <[email protected]>
189+
164190
Shraddheya Shendre <[email protected]>
165191
Shubh Mehta <[email protected]>
166192
Shubham Mishra <[email protected]>
193+
Siddhesh waje <[email protected]>
167194
Sivam Das <[email protected]>
168195
Snehil Shah <[email protected]>
169196
Soumajit Chatterjee <[email protected]>
170197
Spandan Barve <[email protected]>
198+
Srinivas Batthula <[email protected]>
171199
Stephannie Jiménez Gacha <[email protected]>
172200
Suhaib Ilahi <[email protected]>
173201
Suraj Kumar <[email protected]>
@@ -177,26 +205,31 @@ Tirtadwipa Manunggal <[email protected]>
177205
Tudor Pagu <[email protected]>
178206
Tufailahmed Bargir <[email protected]>
179207
Tushar Bhardwaj <[email protected]>
208+
Tyson Cung <[email protected]>
180209
Uday Kakade <[email protected]>
181210
Ujjwal Kirti <[email protected]>
182211
Utkarsh <http://[email protected]>
183212
Utkarsh Raj <[email protected]>
184213
UtkershBasnet <[email protected]>
185214
Vaibhav Patel <[email protected]>
215+
Vansh Choudhary <[email protected]>
186216
Vara Rahul Rajana <[email protected]>
187217
Varad Gupta <[email protected]>
188218
Vinit Pandit <[email protected]>
189219
Vivek Maurya <[email protected]>
220+
Wendy Yuchen Sun <[email protected]>
190221
Xiaochuan Ye <[email protected]>
191222
Yaswanth Kosuru <[email protected]>
192223
Yernar Yergaziyev <[email protected]>
193224
Yugal Kaushik <[email protected]>
194225
Yuvi Mittal <[email protected]>
226+
deepak427 <[email protected]>
195227
devshree-bhati <[email protected]>
196228
197229
ekambains <[email protected]>
198230
fadiothman22 <[email protected]>
199231
iraandrushko <[email protected]>
232+
200233
lohithganni <[email protected]>
201234
olenkabilonizhka <[email protected]>
202235
pranav-1720 <[email protected]>

README.md

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ var dtypeEnum = require( '@stdlib/ndarray-base-buffer-dtype-enum' );
7575

7676
#### dtypeEnum( buffer )
7777

78-
Returns the [data type][@stdlib/ndarray/dtypes] enumeration constant of an ndarray data [`buffer`][@stdlib/ndarray/base/buffer-ctors].
78+
Returns the [data type][@stdlib/ndarray/dtypes] enumeration constant of an ndarray data [buffer][@stdlib/ndarray/base/buffer-ctors].
7979

8080
```javascript
8181
var Float64Array = require( '@stdlib/array-float64' );
@@ -85,7 +85,7 @@ var c = dtypeEnum( buf );
8585
// returns <number>
8686
```
8787

88-
If provided an ndarray data [`buffer`][@stdlib/ndarray/base/buffer-ctors] having an unknown or unsupported [data type][@stdlib/ndarray/dtypes], the function returns `null`.
88+
If provided an ndarray data [buffer][@stdlib/ndarray/base/buffer-ctors] having an unknown or unsupported [data type][@stdlib/ndarray/dtypes], the function returns `null`.
8989

9090
```javascript
9191
var c = dtypeEnum( 'beep' );
@@ -119,40 +119,27 @@ var c = dtypeEnum( 'beep' );
119119
```javascript
120120
var dtypes = require( '@stdlib/ndarray-dtypes' );
121121
var bufferCtors = require( '@stdlib/ndarray-base-buffer-ctors' );
122-
var isFunction = require( '@stdlib/assert-is-function' );
123122
var dtypeEnum = require( '@stdlib/ndarray-base-buffer-dtype-enum' );
124123

125-
var DTYPES;
126-
var ctor;
127-
var buf;
128-
var len;
129-
var c;
130-
var i;
131-
132124
// Get a list of supported ndarray buffer data types:
133-
DTYPES = dtypes();
125+
var DTYPES = dtypes( 'integer_and_generic' );
134126

135127
// Buffer length:
136-
len = 10;
128+
var len = 10;
137129

138130
// For each supported data type, create a buffer and retrieve its data type enumeration constant...
131+
var ctor;
132+
var i;
139133
for ( i = 0; i < DTYPES.length; i++ ) {
140134
ctor = bufferCtors( DTYPES[ i ] );
141-
if ( DTYPES[ i ] === 'binary' && isFunction( ctor.alloc ) ) {
142-
buf = ctor.alloc( len );
143-
} else {
144-
buf = new ctor( len );
145-
}
146-
c = dtypeEnum( buf );
147-
console.log( '%s => %d', DTYPES[ i ], c );
135+
console.log( '%s => %d', DTYPES[ i ], dtypeEnum( new ctor( len ) ) );
148136
}
149137

150138
// Try an array-like object...
151-
buf = {
152-
'length': 10
139+
var buf = {
140+
'length': len
153141
};
154-
c = dtypeEnum( buf );
155-
console.log( '%s => %s', 'generic', c );
142+
console.log( '%s => %s', 'generic', dtypeEnum( buf ) );
156143
```
157144

158145
</section>

benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var dtypeEnum = require( './../lib' );
3131

3232
// VARIABLES //
3333

34-
var DTYPES = dtypes();
34+
var DTYPES = dtypes( 'integer_and_generic' );
3535

3636

3737
// MAIN //

dist/index.js

Lines changed: 3 additions & 3 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.

examples/index.js

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,24 @@
2020

2121
var dtypes = require( '@stdlib/ndarray-dtypes' );
2222
var bufferCtors = require( '@stdlib/ndarray-base-buffer-ctors' );
23-
var isFunction = require( '@stdlib/assert-is-function' );
2423
var dtypeEnum = require( './../lib' );
2524

26-
var DTYPES;
27-
var ctor;
28-
var buf;
29-
var len;
30-
var c;
31-
var i;
32-
3325
// Get a list of supported ndarray buffer data types:
34-
DTYPES = dtypes();
26+
var DTYPES = dtypes( 'integer_and_generic' );
3527

3628
// Buffer length:
37-
len = 10;
29+
var len = 10;
3830

3931
// For each supported data type, create a buffer and retrieve its data type enumeration constant...
32+
var ctor;
33+
var i;
4034
for ( i = 0; i < DTYPES.length; i++ ) {
4135
ctor = bufferCtors( DTYPES[ i ] );
42-
if ( DTYPES[ i ] === 'binary' && isFunction( ctor.alloc ) ) {
43-
buf = ctor.alloc( len );
44-
} else {
45-
buf = new ctor( len );
46-
}
47-
c = dtypeEnum( buf );
48-
console.log( '%s => %d', DTYPES[ i ], c );
36+
console.log( '%s => %d', DTYPES[ i ], dtypeEnum( new ctor( len ) ) );
4937
}
5038

5139
// Try an array-like object...
52-
buf = {
53-
'length': 10
40+
var buf = {
41+
'length': len
5442
};
55-
c = dtypeEnum( buf );
56-
console.log( '%s => %s', 'generic', c );
43+
console.log( '%s => %s', 'generic', dtypeEnum( buf ) );

0 commit comments

Comments
 (0)