Skip to content

Commit 2f597eb

Browse files
committed
Auto-generated commit
1 parent 914704d commit 2f597eb

9 files changed

Lines changed: 242 additions & 4 deletions

File tree

.github/.keepalive

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

.npmrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,16 @@ save = false
2929

3030
# Do not generate provenance metadata:
3131
provenance = false
32+
33+
# Prefer cached dependencies during install:
34+
prefer-offline = true
35+
36+
# Require signing Git commits and tags when using `npm version`:
37+
sign-git-commit = true
38+
sign-git-tag = true
39+
40+
# Run Git commit hooks when using `npm version`:
41+
commit-hooks = true
42+
43+
# Require that dependencies within the dependency tree have a minimum release age (in days) in order to guard against supply chain attacks:
44+
min-release-age = 90

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 (2026-06-22)
8+
9+
<section class="features">
10+
11+
### Features
12+
13+
- [`4467556`](https://github.com/stdlib-js/stdlib/commit/44675569bea3c9d21c1f9afc835f7efb4344a22c) - add float16 dtype support to `array/typed` [(#13053)](https://github.com/stdlib-js/stdlib/pull/13053)
14+
15+
</section>
16+
17+
<!-- /.features -->
18+
19+
<section class="commits">
20+
21+
### Commits
22+
23+
<details>
24+
25+
- [`4467556`](https://github.com/stdlib-js/stdlib/commit/44675569bea3c9d21c1f9afc835f7efb4344a22c) - **feat:** add float16 dtype support to `array/typed` [(#13053)](https://github.com/stdlib-js/stdlib/pull/13053) _(by Gururaj Gurram, Athan Reines)_
26+
27+
</details>
28+
29+
</section>
30+
31+
<!-- /.commits -->
32+
33+
<section class="contributors">
34+
35+
### Contributors
36+
37+
A total of 2 people contributed to this release. Thank you to the following contributors:
38+
39+
- Athan Reines
40+
- Gururaj Gurram
41+
42+
</section>
43+
44+
<!-- /.contributors -->
45+
46+
</section>
47+
48+
<!-- /.release -->
49+
550
<section class="release" id="v0.3.2">
651

752
## 0.3.2 (2026-02-08)

benchmark/benchmark.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,24 @@ bench( format( '%s:dtype=%s', pkg, 'float32' ), function benchmark( b ) {
8585
b.end();
8686
});
8787

88+
bench( format( '%s:dtype=%s', pkg, 'float16' ), function benchmark( b ) {
89+
var arr;
90+
var i;
91+
b.tic();
92+
for ( i = 0; i < b.iterations; i++ ) {
93+
arr = typedarray( 0, 'float16' );
94+
if ( arr.length !== 0 ) {
95+
b.fail( 'should have length 0' );
96+
}
97+
}
98+
b.toc();
99+
if ( !isTypedArray( arr ) ) {
100+
b.fail( 'should return a typed array' );
101+
}
102+
b.pass( 'benchmark finished' );
103+
b.end();
104+
});
105+
88106
bench( format( '%s:dtype=%s', pkg, 'complex128' ), function benchmark( b ) {
89107
var arr;
90108
var i;
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2026 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var bench = require( '@stdlib/bench-harness' );
24+
var pow = require( '@stdlib/math-base-special-pow' );
25+
var isTypedArray = require( '@stdlib/assert-is-typed-array' );
26+
var format = require( '@stdlib/string-format' );
27+
var pkg = require( './../package.json' ).name;
28+
var typedarray = require( './../lib' );
29+
30+
31+
// FUNCTIONS //
32+
33+
/**
34+
* Creates a benchmark function.
35+
*
36+
* @private
37+
* @param {PositiveInteger} len - array length
38+
* @returns {Function} benchmark function
39+
*/
40+
function createBenchmark( len ) {
41+
return benchmark;
42+
43+
/**
44+
* Benchmark function.
45+
*
46+
* @private
47+
* @param {Benchmark} b - benchmark instance
48+
*/
49+
function benchmark( b ) {
50+
var arr;
51+
var i;
52+
53+
b.tic();
54+
for ( i = 0; i < b.iterations; i++ ) {
55+
arr = typedarray( len, 'float16' );
56+
if ( arr.length !== len ) {
57+
b.fail( 'unexpected length' );
58+
}
59+
}
60+
b.toc();
61+
if ( !isTypedArray( arr ) ) {
62+
b.fail( 'should return a typed array' );
63+
}
64+
b.pass( 'benchmark finished' );
65+
b.end();
66+
}
67+
}
68+
69+
70+
// MAIN //
71+
72+
/**
73+
* Main execution sequence.
74+
*
75+
* @private
76+
*/
77+
function main() {
78+
var len;
79+
var min;
80+
var max;
81+
var f;
82+
var i;
83+
84+
min = 1; // 10^min
85+
max = 6; // 10^max
86+
87+
for ( i = min; i <= max; i++ ) {
88+
len = pow( 10, i );
89+
f = createBenchmark( len );
90+
bench( format( '%s:dtype=%s,len=%d', pkg, 'float32', len ), f );
91+
}
92+
}
93+
94+
main();

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,15 @@
4444
"@stdlib/strided-base-reinterpret-complex128": "^0.2.3",
4545
"@stdlib/strided-base-reinterpret-complex64": "^0.2.2",
4646
"@stdlib/string-format": "^0.2.3",
47-
"@stdlib/types": "^0.4.3",
47+
"@stdlib/types": "^0.5.1",
4848
"@stdlib/error-tools-fmtprodmsg": "^0.2.3"
4949
},
5050
"devDependencies": {
5151
"@stdlib/array-bool": "^0.1.2",
5252
"@stdlib/array-buffer": "^0.2.3",
5353
"@stdlib/array-complex128": "^0.3.2",
5454
"@stdlib/array-complex64": "^0.3.2",
55+
"@stdlib/array-float16": "github:stdlib-js/array-float16#main",
5556
"@stdlib/array-float32": "^0.2.3",
5657
"@stdlib/array-float64": "^0.2.3",
5758
"@stdlib/array-int16": "^0.2.3",

0 commit comments

Comments
 (0)