Skip to content

Commit eae52da

Browse files
committed
Auto-generated commit
1 parent a02a271 commit eae52da

File tree

13 files changed

+463
-167
lines changed

13 files changed

+463
-167
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ jobs:
9494
# Replace branch in README.md link definitions for badges with the new version:
9595
find . -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/branch([=:])[^ ]+/branch\1v${NEW_VERSION}/g"
9696
97+
# Rewrite CHANGELOG.md to replace "Unreleased" with the new version:
98+
sed -Ei "s/Unreleased/${NEW_VERSION}/g" CHANGELOG.md
99+
sed -Ei "s/unreleased/v${NEW_VERSION}/g" CHANGELOG.md
100+
97101
# Create a new commit and tag:
98102
git add package.json README.md
99103
git commit -m "Release v${NEW_VERSION}"

CHANGELOG.md

Lines changed: 121 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,124 @@
22

33
> Package changelog.
44
5-
See [GitHub Releases](https://github.com/stdlib-js/array-filled-by/releases) for the changelog.
5+
<section class="release" id="unreleased">
6+
7+
## Unreleased (2024-07-01)
8+
9+
<section class="features">
10+
11+
### Features
12+
13+
- [`37ca4b7`](https://github.com/stdlib-js/stdlib/commit/37ca4b7ca0d5a2d0553f4d3b0d763d81e38a1bc9) - add boolean dtype support to `array/filled-by` [(#2487)](https://github.com/stdlib-js/stdlib/pull/2487)
14+
15+
</section>
16+
17+
<!-- /.features -->
18+
19+
<section class="commits">
20+
21+
### Commits
22+
23+
<details>
24+
25+
- [`37ca4b7`](https://github.com/stdlib-js/stdlib/commit/37ca4b7ca0d5a2d0553f4d3b0d763d81e38a1bc9) - **feat:** add boolean dtype support to `array/filled-by` [(#2487)](https://github.com/stdlib-js/stdlib/pull/2487) _(by Jaysukh Makvana, Athan Reines)_
26+
- [`75d4f83`](https://github.com/stdlib-js/stdlib/commit/75d4f83cb85610d23a04dc21a03f8075f6d3665f) - **refactor:** update require and include paths _(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 2 people contributed to this release. Thank you to the following contributors:
39+
40+
- Athan Reines
41+
- Jaysukh Makvana
42+
43+
</section>
44+
45+
<!-- /.contributors -->
46+
47+
</section>
48+
49+
<!-- /.release -->
50+
51+
<section class="release" id="v0.2.1">
52+
53+
## 0.2.1 (2024-02-25)
54+
55+
<section class="features">
56+
57+
### Features
58+
59+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017) - update minimum TypeScript version
60+
61+
</section>
62+
63+
<!-- /.features -->
64+
65+
<section class="bug-fixes">
66+
67+
### Bug Fixes
68+
69+
- [`14bacb3`](https://github.com/stdlib-js/stdlib/commit/14bacb3cbfced427bcbadae7cbc649a62bb62b69) - update import path for `Collection` type definition
70+
71+
</section>
72+
73+
<!-- /.bug-fixes -->
74+
75+
<section class="breaking-changes">
76+
77+
### BREAKING CHANGES
78+
79+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017): update minimum TypeScript version
80+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017): update minimum TypeScript version to 4.1
81+
82+
- To migrate, users should upgrade their TypeScript version to at least version 4.1.
83+
84+
</section>
85+
86+
<!-- /.breaking-changes -->
87+
88+
<section class="commits">
89+
90+
### Commits
91+
92+
<details>
93+
94+
- [`9758584`](https://github.com/stdlib-js/stdlib/commit/975858483dc5155f126cc472ea9bc681166dfc91) - **refactor:** query default dtype _(by Athan Reines)_
95+
- [`dea49e0`](https://github.com/stdlib-js/stdlib/commit/dea49e03ab5571233e3da26835a6a6d3256d5737) - **docs:** use single quotes in require calls instead of backticks _(by Philipp Burckhardt)_
96+
- [`6a9cc0e`](https://github.com/stdlib-js/stdlib/commit/6a9cc0e47fa5783053f8fd2895ea76f5deea0829) - **build:** replace tslint directive with eslint equivalent _(by Philipp Burckhardt)_
97+
- [`e3fc2d4`](https://github.com/stdlib-js/stdlib/commit/e3fc2d48bf55690a3ead6cc37eed3472f34561c0) - **docs:** update links _(by Athan Reines)_
98+
- [`3b59a50`](https://github.com/stdlib-js/stdlib/commit/3b59a503252cfe16765f84eab3bdb0ca06f6bb79) - **build:** remove vestiges of tslint directives _(by Philipp Burckhardt)_
99+
- [`df3c9b3`](https://github.com/stdlib-js/stdlib/commit/df3c9b368d8a3dd7dd38f8768deb53c2a780c055) - **build:** remove tslint directives _(by Philipp Burckhardt)_
100+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017) - **feat:** update minimum TypeScript version _(by Philipp Burckhardt)_
101+
- [`14bacb3`](https://github.com/stdlib-js/stdlib/commit/14bacb3cbfced427bcbadae7cbc649a62bb62b69) - **fix:** update import path for `Collection` type definition _(by Athan Reines)_
102+
103+
</details>
104+
105+
</section>
106+
107+
<!-- /.commits -->
108+
109+
<section class="contributors">
110+
111+
### Contributors
112+
113+
A total of 2 people contributed to this release. Thank you to the following contributors:
114+
115+
- Athan Reines
116+
- Philipp Burckhardt
117+
118+
</section>
119+
120+
<!-- /.contributors -->
121+
122+
</section>
123+
124+
<!-- /.release -->
125+

CONTRIBUTORS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com>
6363
Raunak Kumar Gupta <raunakmodanwal321@gmail.com>
6464
Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
6565
Ricky Reusser <rsreusser@gmail.com>
66+
Ridam Garg <67867319+RidamGarg@users.noreply.github.com>
6667
Robert Gislason <gztown2216@yahoo.com>
6768
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
6869
Rutam <138517416+performant23@users.noreply.github.com>
@@ -75,7 +76,7 @@ Shraddheya Shendre <shendreshraddheya@gmail.com>
7576
Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
7677
Shubham Mishra <shubh622005@gmail.com>
7778
Sivam Das <100067002+Sivam2313@users.noreply.github.com>
78-
Snehil Shah <130062020+Snehil-Shah@users.noreply.github.com>
79+
Snehil Shah <snehilshah.989@gmail.com>
7980
Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>
8081
Spandan Barve <contact@marsian.dev>
8182
Stephannie Jiménez Gacha <steff456@hotmail.com>

README.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
@license Apache-2.0
44
5-
Copyright (c) 2021 The Stdlib Authors.
5+
Copyright (c) 2024 The Stdlib Authors.
66
77
Licensed under the Apache License, Version 2.0 (the "License");
88
you may not use this file except in compliance with the License.
@@ -75,29 +75,14 @@ var filledarrayBy = require( '@stdlib/array-filled-by' );
7575

7676
#### filledarrayBy( \[dtype] )
7777

78-
Creates a filled array having a specified data type `dtype`.
78+
Creates a filled array having a specified [data type][@stdlib/array/dtypes] `dtype`.
7979

8080
```javascript
8181
var arr = filledarrayBy();
8282
// returns <Float64Array>
8383
```
8484

85-
The function recognizes the following data types:
86-
87-
- `float64`: double-precision floating-point numbers (IEEE 754)
88-
- `float32`: single-precision floating-point numbers (IEEE 754)
89-
- `complex128`: double-precision complex floating-point numbers
90-
- `complex64`: single-precision complex floating-point numbers
91-
- `int32`: 32-bit two's complement signed integers
92-
- `uint32`: 32-bit unsigned integers
93-
- `int16`: 16-bit two's complement signed integers
94-
- `uint16`: 16-bit unsigned integers
95-
- `int8`: 8-bit two's complement signed integers
96-
- `uint8`: 8-bit unsigned integers
97-
- `uint8c`: 8-bit unsigned integers clamped to `0-255`
98-
- `generic`: generic JavaScript values
99-
100-
By default, the output array data type is `float64` (i.e., a [typed array][mdn-typed-array]). To specify an alternative data type, provide a `dtype` argument.
85+
By default, the output array [data type][@stdlib/array/dtypes] is `float64` (i.e., a [typed array][mdn-typed-array]). To specify an alternative [data type][@stdlib/array/dtypes], provide a `dtype` argument.
10186

10287
```javascript
10388
var arr = filledarrayBy( 'int32' );
@@ -362,6 +347,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
362347

363348
[mdn-arraybuffer]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
364349

350+
[@stdlib/array/dtypes]: https://github.com/stdlib-js/array-dtypes
351+
365352
<!-- <related-links> -->
366353

367354
[@stdlib/array/filled]: https://github.com/stdlib-js/array-filled

benchmark/benchmark.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2021 The Stdlib Authors.
4+
* Copyright (c) 2024 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -98,6 +98,28 @@ bench( pkg+':dtype=float32', function benchmark( b ) {
9898
b.end();
9999
});
100100

101+
bench( pkg+':dtype=bool', function benchmark( b ) {
102+
var clbk;
103+
var arr;
104+
var i;
105+
106+
clbk = constantFunction( true );
107+
108+
b.tic();
109+
for ( i = 0; i < b.iterations; i++ ) {
110+
arr = filledarrayBy( 0, 'bool', clbk );
111+
if ( arr.length !== 0 ) {
112+
b.fail( 'should have length 0' );
113+
}
114+
}
115+
b.toc();
116+
if ( !isTypedArrayLike( arr ) ) {
117+
b.fail( 'should return a typed array' );
118+
}
119+
b.pass( 'benchmark finished' );
120+
b.end();
121+
});
122+
101123
bench( pkg+':dtype=complex128', function benchmark( b ) {
102124
var clbk;
103125
var arr;

benchmark/benchmark.length.bool.js

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2024 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 isTypedArrayLike = require( '@stdlib/assert-is-typed-array-like' );
26+
var constantFunction = require( '@stdlib/utils-constant-function' );
27+
var pkg = require( './../package.json' ).name;
28+
var filledarray = 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 clbk;
51+
var arr;
52+
var i;
53+
54+
clbk = constantFunction( true );
55+
56+
b.tic();
57+
for ( i = 0; i < b.iterations; i++ ) {
58+
arr = filledarray( len, 'bool', clbk );
59+
if ( arr.length !== len ) {
60+
b.fail( 'unexpected length' );
61+
}
62+
}
63+
b.toc();
64+
if ( !isTypedArrayLike( arr ) ) {
65+
b.fail( 'should return a typed array' );
66+
}
67+
b.pass( 'benchmark finished' );
68+
b.end();
69+
}
70+
}
71+
72+
73+
// MAIN //
74+
75+
/**
76+
* Main execution sequence.
77+
*
78+
* @private
79+
*/
80+
function main() {
81+
var len;
82+
var min;
83+
var max;
84+
var f;
85+
var i;
86+
87+
min = 1; // 10^min
88+
max = 6; // 10^max
89+
90+
for ( i = min; i <= max; i++ ) {
91+
len = pow( 10, i );
92+
f = createBenchmark( len );
93+
bench( pkg+':dtype=bool,len='+len, f );
94+
}
95+
}
96+
97+
main();

dist/index.js

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

0 commit comments

Comments
 (0)