Skip to content

Commit ca86657

Browse files
committed
Auto-generated commit
1 parent a6d0969 commit ca86657

File tree

16 files changed

+426
-55
lines changed

16 files changed

+426
-55
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: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,51 @@
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+
- [`8d28862`](https://github.com/stdlib-js/stdlib/commit/8d28862f79b21b726cd80d47f85c73cf6d2d2d5c) - add support for `struct` and `DataType` dtype values
14+
15+
</section>
16+
17+
<!-- /.features -->
18+
19+
<section class="commits">
20+
21+
### Commits
22+
23+
<details>
24+
25+
- [`04c434a`](https://github.com/stdlib-js/stdlib/commit/04c434ac661b2f006a1ab737efb1dec2a72b0efd) - **docs:** update type _(by Athan Reines)_
26+
- [`8d28862`](https://github.com/stdlib-js/stdlib/commit/8d28862f79b21b726cd80d47f85c73cf6d2d2d5c) - **feat:** add support for `struct` and `DataType` dtype values _(by Athan Reines)_
27+
28+
</details>
29+
30+
</section>
31+
32+
<!-- /.commits -->
33+
34+
<section class="contributors">
35+
36+
### Contributors
37+
38+
A total of 1 person contributed to this release. Thank you to this contributor:
39+
40+
- Athan Reines
41+
42+
</section>
43+
44+
<!-- /.contributors -->
45+
46+
</section>
47+
48+
<!-- /.release -->
49+
550
<section class="release" id="v0.3.0">
651

752
## 0.3.0 (2024-07-29)

CONTRIBUTORS

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,35 +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>
29+
Annamalai Prabu <apfossdev@gmail.com>
2530
Anshu Kumar <132515490+anxhukumar@users.noreply.github.com>
2631
Anshu Kumar <contact.anshukumar@protonmail.com>
32+
Anshuman Singh <109489361+Anshumancanrock@users.noreply.github.com>
2733
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>
2837
Athan Reines <kgryte@gmail.com>
38+
Atharva Patil <124063987+atharva-patil-23@users.noreply.github.com>
2939
Ayaka <73595362+USERSATOSHI@users.noreply.github.com>
3040
Bhavishy Agrawal <90029607+bhavishy2801@users.noreply.github.com>
3141
Brendan Graetz <bguiz@users.noreply.github.com>
3242
Bruno Fenzl <brunofenzl@gmail.com>
3343
Bryan Elee <rxbryn@gmail.com>
3444
Chinmay Joshi <86140365+JawHawk@users.noreply.github.com>
3545
Christopher Dambamuromo <chridam@gmail.com>
46+
DUDHAT HEMIL PRAVINKUMAR <138382078+Hemil36@users.noreply.github.com>
3647
Dan Rose <danoftheroses@gmail.com>
48+
Daniel Hernandez Gomez <156333015+dhernandeez13@users.noreply.github.com>
3749
Daniel Killenberger <daniel.killenberger@gmail.com>
3850
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
3951
Debashis Maharana <debashismaharana7854@gmail.com>
4052
Deep Trivedi <128926685+thedeeppp@users.noreply.github.com>
53+
Deepak Singh <78257493+Deepak91168@users.noreply.github.com>
54+
Deepak Singh <negid0253@gmail.com>
4155
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
4256
Dev Goel <135586571+corsairier@users.noreply.github.com>
4357
Dhanyabad behera <110620935+dhanyabad11@users.noreply.github.com>
@@ -53,11 +67,15 @@ Frank Kovacs <fran70kk@gmail.com>
5367
GK Bishnoi <gkishan1kyt@gmail.com>
5468
GURU PRASAD SHARMA <168292003+GURUPRASADSHARMA@users.noreply.github.com>
5569
Gaurav <gaurav70380@gmail.com>
70+
Gaurav Kaushik <144526331+Gauravkaushik-1206@users.noreply.github.com>
71+
Gautam Kaushik <162317291+Kaushikgtm@users.noreply.github.com>
5672
Gautam sharma <gautamkrishnasharma1@gmail.com>
73+
GeoDaoyu <geodaoyu@foxmail.com>
5774
Girish Garg <garggirish2020@gmail.com>
5875
Golden Kumar <103646877+AuenKr@users.noreply.github.com>
5976
Gunj Joshi <gunjjoshi8372@gmail.com>
6077
Gururaj Gurram <gururajgurram1512@gmail.com>
78+
Harishchandra Reddy <harish.7000@gmail.com>
6179
Haroon Rasheed <51189276+haroon26@users.noreply.github.com>
6280
Harsh <harshyadav6078@gmail.com>
6381
HarshaNP <96897754+GittyHarsha@users.noreply.github.com>
@@ -80,6 +98,7 @@ Joris Labie <joris.labie1@gmail.com>
8098
Justin Dennison <justin1dennison@gmail.com>
8199
Justyn Shelby <96994781+ShelbyJustyn@users.noreply.github.com>
82100
Karan Anand <anandkarancompsci@gmail.com>
101+
Karan Vasudevamurthy <karanlvm123@gmail.com>
83102
Karan Yadav <77043443+karanBRAVO@users.noreply.github.com>
84103
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
85104
Kaushikgtm <162317291+Kaushikgtm@users.noreply.github.com>
@@ -89,6 +108,7 @@ Krishnam Agarwal <83017176+888krishnam@users.noreply.github.com>
89108
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
90109
Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com>
91110
Lalit Narayan Yadav <162928571+LalitNarayanYadav@users.noreply.github.com>
111+
Lokesh Ranjan <lokesh.ranjan.phe23@itbhu.ac.in>
92112
Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com>
93113
MANI <77221000+Eternity0207@users.noreply.github.com>
94114
Mahfuza Humayra Mohona <mhmohona@gmail.com>
@@ -104,6 +124,8 @@ Momtchil Momtchev <momtchil@momtchev.com>
104124
Muhammad Haris <harriskhan047@outlook.com>
105125
Muhammad Taaha Tariq <166188821+Taaha-Tariq@users.noreply.github.com>
106126
Muhmmad Saad <106260977+saad-imran-dev@users.noreply.github.com>
127+
NEEKUorAAYUSH <aayush10072004@gmail.com>
128+
Nakul Krishnakumar <nakulkrishnakumar86@gmail.com>
107129
Naresh Jagadeesan <naresh.naresh000@gmail.com>
108130
Naveen Kumar <stupiddint@gmail.com>
109131
Neeraj Pathak <neerajrpathak710@gmail.com>
@@ -116,7 +138,10 @@ Nourhan Hasan <109472010+TheNourhan@users.noreply.github.com>
116138
Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
117139
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
118140
Ori Miles <97595296+orimiles5@users.noreply.github.com>
141+
Payal Goswami <payalgoswami9711@gmail.com>
119142
Philipp Burckhardt <pburckhardt@outlook.com>
143+
Pierre Forstmann <15964998+pierreforstmann@users.noreply.github.com>
144+
Pradyumn Prasad <pradyumnprasad.567@gmail.com>
120145
Prajjwal Bajpai <142303989+prajjwalbajpai@users.noreply.github.com>
121146
Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
122147
Pranav Goswami <pranavchiku11@gmail.com>
@@ -145,25 +170,32 @@ Ruthwik Chikoti <145591715+ruthwikchikoti@users.noreply.github.com>
145170
Ryan Seal <splrk@users.noreply.github.com>
146171
Rylan Yang <137365285+rylany27@users.noreply.github.com>
147172
SAHIL KUMAR <168997976+sahilk45@users.noreply.github.com>
173+
SAUJANYA MAGARDE <162047941+SaujanyaMagarde@users.noreply.github.com>
148174
SHIVAM YADAV <120725381+Shivam-1827@users.noreply.github.com>
149175
Sachin Raj <120590207+schnrj@users.noreply.github.com>
150176
Sahil Goyal <87982509+sahil20021008@users.noreply.github.com>
151177
Sai Avinash <120403424+nasarobot@users.noreply.github.com>
152178
Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com>
153179
Sanchay Ketan Sinha <122982233+satansin123@users.noreply.github.com>
154180
Sarthak Paandey <145528240+SarthakPaandey@users.noreply.github.com>
181+
Satyajeet Chavan <chavansatyajeet2004@gmail.com>
155182
Saurabh Singh <saurabhsraghuvanshi@gmail.com>
183+
Seth-Banker <125103042+Seth-Banker@users.noreply.github.com>
156184
Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
157185
Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com>
158186
Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
187+
Shaswata Panda <106397517+shaswata-26@users.noreply.github.com>
159188
Shivam Ahir <11shivam00@gmail.com>
189+
Shivansh <114570926+shiv343@users.noreply.github.com>
160190
Shraddheya Shendre <shendreshraddheya@gmail.com>
161191
Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
162192
Shubham Mishra <shubh622005@gmail.com>
193+
Siddhesh waje <117733253+siddhesh434@users.noreply.github.com>
163194
Sivam Das <100067002+Sivam2313@users.noreply.github.com>
164195
Snehil Shah <snehilshah.989@gmail.com>
165196
Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>
166197
Spandan Barve <contact@marsian.dev>
198+
Srinivas Batthula <srinivasbatthula05.official@gmail.com>
167199
Stephannie Jiménez Gacha <steff456@hotmail.com>
168200
Suhaib Ilahi <suhaib.elahi87@gmail.com>
169201
Suraj Kumar <125961509+kumarsuraj212003@users.noreply.github.com>
@@ -172,25 +204,32 @@ Tanishq Ahuja <68651083+TheGEN1U5@users.noreply.github.com>
172204
Tirtadwipa Manunggal <tirtadwipa.manunggal@gmail.com>
173205
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
174206
Tufailahmed Bargir <142114244+Tufailahmed-Bargir@users.noreply.github.com>
207+
Tushar Bhardwaj <155543597+TusharBhardwaj441@users.noreply.github.com>
208+
Tyson Cung <45380903+tysoncung@users.noreply.github.com>
175209
Uday Kakade <141299403+udaykakade25@users.noreply.github.com>
210+
Ujjwal Kirti <64329707+ujjwalkirti@users.noreply.github.com>
176211
Utkarsh <http://utkarsh11105@gmail.com>
177212
Utkarsh Raj <rajutkarsh2505@gmail.com>
178213
UtkershBasnet <119008923+UtkershBasnet@users.noreply.github.com>
179214
Vaibhav Patel <98279986+noobCoderVP@users.noreply.github.com>
215+
Vansh Choudhary <iamvanshchaudhary7@gmail.com>
180216
Vara Rahul Rajana <123227543+rajanarahul93@users.noreply.github.com>
181217
Varad Gupta <varadgupta21@gmail.com>
182218
Vinit Pandit <106718914+MeastroZI@users.noreply.github.com>
183219
Vivek Maurya <vm8118134@gmail.com>
220+
Wendy Yuchen Sun <wendyyuchensun@gmail.com>
184221
Xiaochuan Ye <tap91624@gmail.com>
185222
Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com>
186223
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
187224
Yugal Kaushik <yugalkaushik14@gmail.com>
188225
Yuvi Mittal <128018763+yuvi-mittal@users.noreply.github.com>
226+
deepak427 <62477872+deepak427@users.noreply.github.com>
189227
devshree-bhati <147095250+devshree-bhati@users.noreply.github.com>
190228
ditsu <170345142+ditsus@users.noreply.github.com>
191229
ekambains <bainsinbusiness@gmail.com>
192230
fadiothman22 <48636283+fadiothman22@users.noreply.github.com>
193231
iraandrushko <71790513+iraandrushko@users.noreply.github.com>
232+
jsai28 <54253219+jsai28@users.noreply.github.com>
194233
lohithganni <116790357+lohithganni@users.noreply.github.com>
195234
olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com>
196235
pranav-1720 <123018993+pranav-1720@users.noreply.github.com>

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,12 @@ var ctor = ctors( 'float' );
110110
<!-- eslint no-undef: "error" -->
111111

112112
```javascript
113+
var logEachMap = require( '@stdlib/console-log-each-map' );
113114
var dtypes = require( '@stdlib/ndarray-dtypes' );
114115
var ctors = require( '@stdlib/ndarray-base-buffer-ctors' );
115116

116-
var DTYPES = dtypes();
117-
118-
var ctor;
119-
var i;
120-
for ( i = 0; i < DTYPES.length; i++ ) {
121-
ctor = ctors( DTYPES[ i ] );
122-
console.log( ctor );
123-
}
117+
var dts = dtypes( 'integer_and_generic' );
118+
logEachMap( '%s => %s', dts, ctors );
124119
```
125120

126121
</section>

benchmark/benchmark.js

Lines changed: 104 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,22 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench-harness' );
24+
var DataType = require( '@stdlib/ndarray-dtype-ctor' );
2425
var dtypes = require( '@stdlib/ndarray-dtypes' );
26+
var structFactory = require( '@stdlib/dstructs-struct' );
2527
var isFunction = require( '@stdlib/assert-is-function' );
2628
var pkg = require( './../package.json' ).name;
2729
var ctors = require( './../lib' );
2830

2931

3032
// VARIABLES //
3133

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

3436

3537
// MAIN //
3638

37-
bench( pkg, function benchmark( b ) {
39+
bench( pkg+'::strings', function benchmark( b ) {
3840
var ctor;
3941
var i;
4042

@@ -52,3 +54,103 @@ bench( pkg, function benchmark( b ) {
5254
b.pass( 'benchmark finished' );
5355
b.end();
5456
});
57+
58+
bench( pkg+'::data_type_instances,strings', function benchmark( b ) {
59+
var values;
60+
var ctor;
61+
var i;
62+
63+
values = [
64+
new DataType( 'float64' ),
65+
new DataType( 'float32' ),
66+
new DataType( 'int32' )
67+
];
68+
69+
b.tic();
70+
for ( i = 0; i < b.iterations; i++ ) {
71+
ctor = ctors( values[ i%values.length ] );
72+
if ( typeof ctor !== 'function' ) {
73+
b.fail( 'should return a function' );
74+
}
75+
}
76+
b.toc();
77+
if ( !isFunction( ctor ) ) {
78+
b.fail( 'should return a function' );
79+
}
80+
b.pass( 'benchmark finished' );
81+
b.end();
82+
});
83+
84+
bench( pkg+'::structs', function benchmark( b ) {
85+
var schema;
86+
var values;
87+
var ctor;
88+
var i;
89+
90+
schema = [
91+
{
92+
'name': 'beep',
93+
'type': 'float64'
94+
},
95+
{
96+
'name': 'boop',
97+
'type': 'int32'
98+
}
99+
];
100+
101+
values = [
102+
structFactory( schema ),
103+
structFactory( schema )
104+
];
105+
106+
b.tic();
107+
for ( i = 0; i < b.iterations; i++ ) {
108+
ctor = ctors( values[ i%values.length ] );
109+
if ( typeof ctor !== 'function' ) {
110+
b.fail( 'should return a function' );
111+
}
112+
}
113+
b.toc();
114+
if ( !isFunction( ctor ) ) {
115+
b.fail( 'should return a function' );
116+
}
117+
b.pass( 'benchmark finished' );
118+
b.end();
119+
});
120+
121+
bench( pkg+'::data_type_instances,structs', function benchmark( b ) {
122+
var schema;
123+
var values;
124+
var ctor;
125+
var i;
126+
127+
schema = [
128+
{
129+
'name': 'beep',
130+
'type': 'float64'
131+
},
132+
{
133+
'name': 'boop',
134+
'type': 'int32'
135+
}
136+
];
137+
138+
values = [
139+
new DataType( structFactory( schema ) ),
140+
new DataType( structFactory( schema ) )
141+
];
142+
143+
b.tic();
144+
for ( i = 0; i < b.iterations; i++ ) {
145+
ctor = ctors( values[ i%values.length ] );
146+
if ( typeof ctor !== 'function' ) {
147+
b.fail( 'should return a function' );
148+
}
149+
}
150+
b.toc();
151+
if ( !isFunction( ctor ) ) {
152+
b.fail( 'should return a function' );
153+
}
154+
b.pass( 'benchmark finished' );
155+
b.end();
156+
});

0 commit comments

Comments
 (0)