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 <60700731+abdelrahman04@users.noreply.github.com>
99
Abdul Kaium <97376242+impawstarlight@users.noreply.github.com>
1010
Abhay Punia <156515195+Hecker165@users.noreply.github.com>
1111
Abhijit Raut <abhijitmraut8010@gmail.com>
12+
Abhishek G <166795493+AbhishekG-Codes@users.noreply.github.com>
1213
Abhishek Jain <40913033+abhishekblue@users.noreply.github.com>
1314
Adarsh Palaskar <adarshpalaskar99@gmail.com>
1415
Aditya Sapra <adityaework@gmail.com>
16+
Aditya Singh <adityasinghk099@gmail.com>
1517
Ahmed Atwa <Ahmedatwa866@yahoo.com>
1618
Ahmed Kashkoush <ahmedkashkoush464@gmail.com>
1719
Ahmed Khaled <kahmd1444@gmail.com>
1820
Aksshay Balasubramanian <119944779+Aksshay88@users.noreply.github.com>
1921
Aleksandr <112382387+alextes90@users.noreply.github.com>
2022
Ali Salesi <ali_sal1381@yahoo.com>
21-
AlyAbdelmoneim <148393799+AlyAbdelmoneim@users.noreply.github.com>
23+
Aly Abdelmoneim <148393799+AlyAbdelmoneim@users.noreply.github.com>
2224
Aman Bhansali <bhansali.1@iitj.ac.in>
2325
AmanBhadkariya <140033975+AmanBhadkariya@users.noreply.github.com>
26+
Amisha Chhajed <136238836+amishhaa@users.noreply.github.com>
2427
Amit Jimiwal <amitjimiwal45@gmail.com>
28+
Anmol Sah <113588714+anmolsah@users.noreply.github.com>
2529
Annamalai Prabu <apfossdev@gmail.com>
2630
Anshu Kumar <132515490+anxhukumar@users.noreply.github.com>
2731
Anshu Kumar <contact.anshukumar@protonmail.com>
32+
Anshuman Singh <109489361+Anshumancanrock@users.noreply.github.com>
2833
Anudeep Sanapala <anudeep0306@gmail.com>
34+
Arihant Pal <arihant0pal@gmail.com>
35+
Aryan Bhirud <112156883+AryanBhirud@users.noreply.github.com>
36+
AryanJ18 <18aryanj2006@gmail.com>
2937
Athan Reines <kgryte@gmail.com>
38+
Atharva Patil <124063987+atharva-patil-23@users.noreply.github.com>
3039
Ayaka <73595362+USERSATOSHI@users.noreply.github.com>
3140
Bhavishy Agrawal <90029607+bhavishy2801@users.noreply.github.com>
3241
Brendan Graetz <bguiz@users.noreply.github.com>
3342
Bruno Fenzl <brunofenzl@gmail.com>
3443
Bryan Elee <rxbryn@gmail.com>
3544
Chinmay Joshi <86140365+JawHawk@users.noreply.github.com>
3645
Christopher Dambamuromo <chridam@gmail.com>
46+
DUDHAT HEMIL PRAVINKUMAR <138382078+Hemil36@users.noreply.github.com>
3747
Dan Rose <danoftheroses@gmail.com>
48+
Daniel Hernandez Gomez <156333015+dhernandeez13@users.noreply.github.com>
3849
Daniel Killenberger <daniel.killenberger@gmail.com>
3950
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
4051
Debashis Maharana <debashismaharana7854@gmail.com>
4152
Deep Trivedi <128926685+thedeeppp@users.noreply.github.com>
4253
Deepak Singh <78257493+Deepak91168@users.noreply.github.com>
54+
Deepak Singh <negid0253@gmail.com>
4355
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
4456
Dev Goel <135586571+corsairier@users.noreply.github.com>
4557
Dhanyabad behera <110620935+dhanyabad11@users.noreply.github.com>
@@ -55,12 +67,15 @@ Frank Kovacs <fran70kk@gmail.com>
5567
GK Bishnoi <gkishan1kyt@gmail.com>
5668
GURU PRASAD SHARMA <168292003+GURUPRASADSHARMA@users.noreply.github.com>
5769
Gaurav <gaurav70380@gmail.com>
70+
Gaurav Kaushik <144526331+Gauravkaushik-1206@users.noreply.github.com>
5871
Gautam Kaushik <162317291+Kaushikgtm@users.noreply.github.com>
5972
Gautam sharma <gautamkrishnasharma1@gmail.com>
73+
GeoDaoyu <geodaoyu@foxmail.com>
6074
Girish Garg <garggirish2020@gmail.com>
6175
Golden Kumar <103646877+AuenKr@users.noreply.github.com>
6276
Gunj Joshi <gunjjoshi8372@gmail.com>
6377
Gururaj Gurram <gururajgurram1512@gmail.com>
78+
Harishchandra Reddy <harish.7000@gmail.com>
6479
Haroon Rasheed <51189276+haroon26@users.noreply.github.com>
6580
Harsh <harshyadav6078@gmail.com>
6681
HarshaNP <96897754+GittyHarsha@users.noreply.github.com>
@@ -93,6 +108,7 @@ Krishnam Agarwal <83017176+888krishnam@users.noreply.github.com>
93108
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
94109
Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com>
95110
Lalit Narayan Yadav <162928571+LalitNarayanYadav@users.noreply.github.com>
111+
Lokesh Ranjan <lokesh.ranjan.phe23@itbhu.ac.in>
96112
Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com>
97113
MANI <77221000+Eternity0207@users.noreply.github.com>
98114
Mahfuza Humayra Mohona <mhmohona@gmail.com>
@@ -108,6 +124,8 @@ Momtchil Momtchev <momtchil@momtchev.com>
108124
Muhammad Haris <harriskhan047@outlook.com>
109125
Muhammad Taaha Tariq <166188821+Taaha-Tariq@users.noreply.github.com>
110126
Muhmmad Saad <106260977+saad-imran-dev@users.noreply.github.com>
127+
NEEKUorAAYUSH <aayush10072004@gmail.com>
128+
Nakul Krishnakumar <nakulkrishnakumar86@gmail.com>
111129
Naresh Jagadeesan <naresh.naresh000@gmail.com>
112130
Naveen Kumar <stupiddint@gmail.com>
113131
Neeraj Pathak <neerajrpathak710@gmail.com>
@@ -120,7 +138,10 @@ Nourhan Hasan <109472010+TheNourhan@users.noreply.github.com>
120138
Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
121139
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
122140
Ori Miles <97595296+orimiles5@users.noreply.github.com>
141+
Payal Goswami <payalgoswami9711@gmail.com>
123142
Philipp Burckhardt <pburckhardt@outlook.com>
143+
Pierre Forstmann <15964998+pierreforstmann@users.noreply.github.com>
144+
Pradyumn Prasad <pradyumnprasad.567@gmail.com>
124145
Prajjwal Bajpai <142303989+prajjwalbajpai@users.noreply.github.com>
125146
Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
126147
Pranav Goswami <pranavchiku11@gmail.com>
@@ -149,25 +170,32 @@ Ruthwik Chikoti <145591715+ruthwikchikoti@users.noreply.github.com>
149170
Ryan Seal <splrk@users.noreply.github.com>
150171
Rylan Yang <137365285+rylany27@users.noreply.github.com>
151172
SAHIL KUMAR <168997976+sahilk45@users.noreply.github.com>
173+
SAUJANYA MAGARDE <162047941+SaujanyaMagarde@users.noreply.github.com>
152174
SHIVAM YADAV <120725381+Shivam-1827@users.noreply.github.com>
153175
Sachin Raj <120590207+schnrj@users.noreply.github.com>
154176
Sahil Goyal <87982509+sahil20021008@users.noreply.github.com>
155177
Sai Avinash <120403424+nasarobot@users.noreply.github.com>
156178
Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com>
157179
Sanchay Ketan Sinha <122982233+satansin123@users.noreply.github.com>
158180
Sarthak Paandey <145528240+SarthakPaandey@users.noreply.github.com>
181+
Satyajeet Chavan <chavansatyajeet2004@gmail.com>
159182
Saurabh Singh <saurabhsraghuvanshi@gmail.com>
183+
Seth-Banker <125103042+Seth-Banker@users.noreply.github.com>
160184
Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
161185
Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com>
162186
Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
187+
Shaswata Panda <106397517+shaswata-26@users.noreply.github.com>
163188
Shivam Ahir <11shivam00@gmail.com>
189+
Shivansh <114570926+shiv343@users.noreply.github.com>
164190
Shraddheya Shendre <shendreshraddheya@gmail.com>
165191
Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
166192
Shubham Mishra <shubh622005@gmail.com>
193+
Siddhesh waje <117733253+siddhesh434@users.noreply.github.com>
167194
Sivam Das <100067002+Sivam2313@users.noreply.github.com>
168195
Snehil Shah <snehilshah.989@gmail.com>
169196
Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>
170197
Spandan Barve <contact@marsian.dev>
198+
Srinivas Batthula <srinivasbatthula05.official@gmail.com>
171199
Stephannie Jiménez Gacha <steff456@hotmail.com>
172200
Suhaib Ilahi <suhaib.elahi87@gmail.com>
173201
Suraj Kumar <125961509+kumarsuraj212003@users.noreply.github.com>
@@ -177,26 +205,31 @@ Tirtadwipa Manunggal <tirtadwipa.manunggal@gmail.com>
177205
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
178206
Tufailahmed Bargir <142114244+Tufailahmed-Bargir@users.noreply.github.com>
179207
Tushar Bhardwaj <155543597+TusharBhardwaj441@users.noreply.github.com>
208+
Tyson Cung <45380903+tysoncung@users.noreply.github.com>
180209
Uday Kakade <141299403+udaykakade25@users.noreply.github.com>
181210
Ujjwal Kirti <64329707+ujjwalkirti@users.noreply.github.com>
182211
Utkarsh <http://utkarsh11105@gmail.com>
183212
Utkarsh Raj <rajutkarsh2505@gmail.com>
184213
UtkershBasnet <119008923+UtkershBasnet@users.noreply.github.com>
185214
Vaibhav Patel <98279986+noobCoderVP@users.noreply.github.com>
215+
Vansh Choudhary <iamvanshchaudhary7@gmail.com>
186216
Vara Rahul Rajana <123227543+rajanarahul93@users.noreply.github.com>
187217
Varad Gupta <varadgupta21@gmail.com>
188218
Vinit Pandit <106718914+MeastroZI@users.noreply.github.com>
189219
Vivek Maurya <vm8118134@gmail.com>
220+
Wendy Yuchen Sun <wendyyuchensun@gmail.com>
190221
Xiaochuan Ye <tap91624@gmail.com>
191222
Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com>
192223
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
193224
Yugal Kaushik <yugalkaushik14@gmail.com>
194225
Yuvi Mittal <128018763+yuvi-mittal@users.noreply.github.com>
226+
deepak427 <62477872+deepak427@users.noreply.github.com>
195227
devshree-bhati <147095250+devshree-bhati@users.noreply.github.com>
196228
ditsu <170345142+ditsus@users.noreply.github.com>
197229
ekambains <bainsinbusiness@gmail.com>
198230
fadiothman22 <48636283+fadiothman22@users.noreply.github.com>
199231
iraandrushko <71790513+iraandrushko@users.noreply.github.com>
232+
jsai28 <54253219+jsai28@users.noreply.github.com>
200233
lohithganni <116790357+lohithganni@users.noreply.github.com>
201234
olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com>
202235
pranav-1720 <123018993+pranav-1720@users.noreply.github.com>

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)