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 <[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]>
29+
Annamalai Prabu <[email protected]>
2530
Anshu Kumar <[email protected]>
2631
Anshu Kumar <[email protected]>
32+
Anshuman Singh <[email protected]>
2733
Anudeep Sanapala <[email protected]>
34+
Arihant Pal <[email protected]>
35+
Aryan Bhirud <[email protected]>
36+
2837
Athan Reines <[email protected]>
38+
Atharva Patil <[email protected]>
2939
3040
Bhavishy Agrawal <[email protected]>
3141
Brendan Graetz <[email protected]>
3242
Bruno Fenzl <[email protected]>
3343
Bryan Elee <[email protected]>
3444
Chinmay Joshi <[email protected]>
3545
Christopher Dambamuromo <[email protected]>
46+
DUDHAT HEMIL PRAVINKUMAR <[email protected]>
3647
48+
Daniel Hernandez Gomez <[email protected]>
3749
Daniel Killenberger <[email protected]>
3850
Daniel Yu <[email protected]>
3951
Debashis Maharana <[email protected]>
4052
Deep Trivedi <[email protected]>
53+
Deepak Singh <[email protected]>
54+
Deepak Singh <[email protected]>
4155
Desh Deepak Kant <[email protected]>
4256
4357
Dhanyabad behera <[email protected]>
@@ -53,11 +67,15 @@ Frank Kovacs <[email protected]>
5367
GK Bishnoi <[email protected]>
5468
GURU PRASAD SHARMA <[email protected]>
5569
70+
Gaurav Kaushik <[email protected]>
71+
Gautam Kaushik <[email protected]>
5672
Gautam sharma <[email protected]>
73+
5774
Girish Garg <[email protected]>
5875
Golden Kumar <[email protected]>
5976
Gunj Joshi <[email protected]>
6077
Gururaj Gurram <[email protected]>
78+
Harishchandra Reddy <[email protected]>
6179
Haroon Rasheed <[email protected]>
6280
6381
@@ -80,6 +98,7 @@ Joris Labie <[email protected]>
8098
Justin Dennison <[email protected]>
8199
Justyn Shelby <[email protected]>
82100
Karan Anand <[email protected]>
101+
Karan Vasudevamurthy <[email protected]>
83102
Karan Yadav <[email protected]>
84103
Karthik Prakash <[email protected]>
85104
Kaushikgtm <[email protected]>
@@ -89,6 +108,7 @@ Krishnam Agarwal <[email protected]>
89108
Krishnendu Das <[email protected]>
90109
Kshitij-Dale <[email protected]>
91110
Lalit Narayan Yadav <[email protected]>
111+
Lokesh Ranjan <[email protected]>
92112
Lovelin Dhoni J B <[email protected]>
93113
94114
Mahfuza Humayra Mohona <[email protected]>
@@ -104,6 +124,8 @@ Momtchil Momtchev <[email protected]>
104124
Muhammad Haris <[email protected]>
105125
Muhammad Taaha Tariq <[email protected]>
106126
Muhmmad Saad <[email protected]>
127+
NEEKUorAAYUSH <[email protected]>
128+
Nakul Krishnakumar <[email protected]>
107129
Naresh Jagadeesan <[email protected]>
108130
Naveen Kumar <[email protected]>
109131
Neeraj Pathak <[email protected]>
@@ -116,7 +138,10 @@ Nourhan Hasan <[email protected]>
116138
Ognjen Jevremović <[email protected]>
117139
Oneday12323 <[email protected]>
118140
Ori Miles <[email protected]>
141+
Payal Goswami <[email protected]>
119142
Philipp Burckhardt <[email protected]>
143+
Pierre Forstmann <[email protected]>
144+
Pradyumn Prasad <[email protected]>
120145
Prajjwal Bajpai <[email protected]>
121146
Prajwal Kulkarni <[email protected]>
122147
Pranav Goswami <[email protected]>
@@ -145,25 +170,32 @@ Ruthwik Chikoti <[email protected]>
145170
Ryan Seal <[email protected]>
146171
Rylan Yang <[email protected]>
147172
SAHIL KUMAR <[email protected]>
173+
SAUJANYA MAGARDE <[email protected]>
148174
SHIVAM YADAV <[email protected]>
149175
Sachin Raj <[email protected]>
150176
Sahil Goyal <[email protected]>
151177
Sai Avinash <[email protected]>
152178
Sai Srikar Dumpeti <[email protected]>
153179
Sanchay Ketan Sinha <[email protected]>
154180
Sarthak Paandey <[email protected]>
181+
Satyajeet Chavan <[email protected]>
155182
Saurabh Singh <[email protected]>
183+
Seth-Banker <[email protected]>
156184
Seyyed Parsa Neshaei <[email protected]>
157185
Shabareesh Shetty <[email protected]>
158186
Shashank Shekhar Singh <[email protected]>
187+
Shaswata Panda <[email protected]>
159188
Shivam Ahir <[email protected]>
189+
160190
Shraddheya Shendre <[email protected]>
161191
Shubh Mehta <[email protected]>
162192
Shubham Mishra <[email protected]>
193+
Siddhesh waje <[email protected]>
163194
Sivam Das <[email protected]>
164195
Snehil Shah <[email protected]>
165196
Soumajit Chatterjee <[email protected]>
166197
Spandan Barve <[email protected]>
198+
Srinivas Batthula <[email protected]>
167199
Stephannie Jiménez Gacha <[email protected]>
168200
Suhaib Ilahi <[email protected]>
169201
Suraj Kumar <[email protected]>
@@ -172,25 +204,32 @@ Tanishq Ahuja <[email protected]>
172204
Tirtadwipa Manunggal <[email protected]>
173205
Tudor Pagu <[email protected]>
174206
Tufailahmed Bargir <[email protected]>
207+
Tushar Bhardwaj <[email protected]>
208+
Tyson Cung <[email protected]>
175209
Uday Kakade <[email protected]>
210+
Ujjwal Kirti <[email protected]>
176211
Utkarsh <http://[email protected]>
177212
Utkarsh Raj <[email protected]>
178213
UtkershBasnet <[email protected]>
179214
Vaibhav Patel <[email protected]>
215+
Vansh Choudhary <[email protected]>
180216
Vara Rahul Rajana <[email protected]>
181217
Varad Gupta <[email protected]>
182218
Vinit Pandit <[email protected]>
183219
Vivek Maurya <[email protected]>
220+
Wendy Yuchen Sun <[email protected]>
184221
Xiaochuan Ye <[email protected]>
185222
Yaswanth Kosuru <[email protected]>
186223
Yernar Yergaziyev <[email protected]>
187224
Yugal Kaushik <[email protected]>
188225
Yuvi Mittal <[email protected]>
226+
deepak427 <[email protected]>
189227
devshree-bhati <[email protected]>
190228
191229
ekambains <[email protected]>
192230
fadiothman22 <[email protected]>
193231
iraandrushko <[email protected]>
232+
194233
lohithganni <[email protected]>
195234
olenkabilonizhka <[email protected]>
196235
pranav-1720 <[email protected]>

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)