Skip to content

Commit 823186c

Browse files
committed
Auto-generated commit
1 parent c169da5 commit 823186c

File tree

11 files changed

+265
-54
lines changed

11 files changed

+265
-54
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-full/releases) for the changelog.
5+
<section class="release" id="unreleased">
6+
7+
## Unreleased (2024-06-26)
8+
9+
<section class="features">
10+
11+
### Features
12+
13+
- [`3fdfa90`](https://github.com/stdlib-js/stdlib/commit/3fdfa902945e503766b1ae4592a2d094efb0ff7f) - add boolean dtype support to `array/full` [(#2461)](https://github.com/stdlib-js/stdlib/pull/2461)
14+
15+
</section>
16+
17+
<!-- /.features -->
18+
19+
<section class="commits">
20+
21+
### Commits
22+
23+
<details>
24+
25+
- [`3fdfa90`](https://github.com/stdlib-js/stdlib/commit/3fdfa902945e503766b1ae4592a2d094efb0ff7f) - **feat:** add boolean dtype support to `array/full` [(#2461)](https://github.com/stdlib-js/stdlib/pull/2461) _(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+
- [`819d2e4`](https://github.com/stdlib-js/stdlib/commit/819d2e407146d4dcc17f8bab53b591b3d573f8a1) - add data type maps and replace use of overloads [(#1317)](https://github.com/stdlib-js/stdlib/pull/1317)
60+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017) - update minimum TypeScript version
61+
62+
</section>
63+
64+
<!-- /.features -->
65+
66+
<section class="bug-fixes">
67+
68+
### Bug Fixes
69+
70+
- [`32a2827`](https://github.com/stdlib-js/stdlib/commit/32a282799ffd272d2a0554e81755a14923564e51) - update import paths for complex type defs
71+
72+
</section>
73+
74+
<!-- /.bug-fixes -->
75+
76+
<section class="breaking-changes">
77+
78+
### BREAKING CHANGES
79+
80+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017): update minimum TypeScript version
81+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017): update minimum TypeScript version to 4.1
82+
83+
- To migrate, users should upgrade their TypeScript version to at least version 4.1.
84+
85+
</section>
86+
87+
<!-- /.breaking-changes -->
88+
89+
<section class="commits">
90+
91+
### Commits
92+
93+
<details>
94+
95+
- [`819d2e4`](https://github.com/stdlib-js/stdlib/commit/819d2e407146d4dcc17f8bab53b591b3d573f8a1) - **feat:** add data type maps and replace use of overloads [(#1317)](https://github.com/stdlib-js/stdlib/pull/1317) _(by Philipp Burckhardt, Athan Reines)_
96+
- [`85c58b7`](https://github.com/stdlib-js/stdlib/commit/85c58b79ba5c9386dbe4f7351e92eec551cb1229) - **refactor:** query default dtype _(by Athan Reines)_
97+
- [`dea49e0`](https://github.com/stdlib-js/stdlib/commit/dea49e03ab5571233e3da26835a6a6d3256d5737) - **docs:** use single quotes in require calls instead of backticks _(by Philipp Burckhardt)_
98+
- [`e3fc2d4`](https://github.com/stdlib-js/stdlib/commit/e3fc2d48bf55690a3ead6cc37eed3472f34561c0) - **docs:** update links _(by Athan Reines)_
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+
- [`32a2827`](https://github.com/stdlib-js/stdlib/commit/32a282799ffd272d2a0554e81755a14923564e51) - **fix:** update import paths for complex type defs _(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: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
@license Apache-2.0
44
5-
Copyright (c) 2022 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.
@@ -82,22 +82,7 @@ var arr = full( 2, 1.0 );
8282
// returns <Float64Array>[ 1.0, 1.0 ]
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 = full( 2, 1, 'int32' );
@@ -242,6 +227,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
242227

243228
[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
244229

230+
[@stdlib/array/dtypes]: https://github.com/stdlib-js/array-dtypes
231+
245232
<!-- <related-links> -->
246233

247234
[@stdlib/array/full-like]: https://github.com/stdlib-js/array-full-like

benchmark/benchmark.js

Lines changed: 20 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) 2022 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.
@@ -85,6 +85,25 @@ bench( pkg+':dtype=float32', function benchmark( b ) {
8585
b.end();
8686
});
8787

88+
bench( pkg+':dtype=bool', function benchmark( b ) {
89+
var arr;
90+
var i;
91+
92+
b.tic();
93+
for ( i = 0; i < b.iterations; i++ ) {
94+
arr = full( 0, true, 'bool' );
95+
if ( arr.length !== 0 ) {
96+
b.fail( 'should have length 0' );
97+
}
98+
}
99+
b.toc();
100+
if ( !isTypedArrayLike( arr ) ) {
101+
b.fail( 'should return a typed array' );
102+
}
103+
b.pass( 'benchmark finished' );
104+
b.end();
105+
});
106+
88107
bench( pkg+':dtype=complex128', function benchmark( b ) {
89108
var arr;
90109
var v;

benchmark/benchmark.length.bool.js

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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 pkg = require( './../package.json' ).name;
27+
var full = require( './../lib' );
28+
29+
30+
// FUNCTIONS //
31+
32+
/**
33+
* Creates a benchmark function.
34+
*
35+
* @private
36+
* @param {PositiveInteger} len - array length
37+
* @returns {Function} benchmark function
38+
*/
39+
function createBenchmark( len ) {
40+
return benchmark;
41+
42+
/**
43+
* Benchmark function.
44+
*
45+
* @private
46+
* @param {Benchmark} b - benchmark instance
47+
*/
48+
function benchmark( b ) {
49+
var arr;
50+
var i;
51+
52+
b.tic();
53+
for ( i = 0; i < b.iterations; i++ ) {
54+
arr = full( len, true, 'bool' );
55+
if ( arr.length !== len ) {
56+
b.fail( 'unexpected length' );
57+
}
58+
}
59+
b.toc();
60+
if ( !isTypedArrayLike( arr ) ) {
61+
b.fail( 'should return a typed array' );
62+
}
63+
b.pass( 'benchmark finished' );
64+
b.end();
65+
}
66+
}
67+
68+
69+
// MAIN //
70+
71+
/**
72+
* Main execution sequence.
73+
*
74+
* @private
75+
*/
76+
function main() {
77+
var len;
78+
var min;
79+
var max;
80+
var f;
81+
var i;
82+
83+
min = 1; // 10^min
84+
max = 6; // 10^max
85+
86+
for ( i = min; i <= max; i++ ) {
87+
len = pow( 10, i );
88+
f = createBenchmark( len );
89+
bench( pkg+':dtype=bool,len='+len, f );
90+
}
91+
}
92+
93+
main();

docs/repl.txt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,6 @@
22
{{alias}}( length, value[, dtype] )
33
Returns a filled array having a specified length.
44

5-
The function supports the following data types:
6-
7-
- float64: double-precision floating-point numbers (IEEE 754)
8-
- float32: single-precision floating-point numbers (IEEE 754)
9-
- complex128: double-precision complex floating-point numbers
10-
- complex64: single-precision complex floating-point numbers
11-
- int32: 32-bit two's complement signed integers
12-
- uint32: 32-bit unsigned integers
13-
- int16: 16-bit two's complement signed integers
14-
- uint16: 16-bit unsigned integers
15-
- int8: 8-bit two's complement signed integers
16-
- uint8: 8-bit unsigned integers
17-
- uint8c: 8-bit unsigned integers clamped to 0-255
18-
- generic: generic JavaScript values
19-
20-
The default array data type is `float64`.
21-
225
Parameters
236
----------
247
length: integer

docs/types/index.d.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,6 @@ import { DataTypeMap } from '@stdlib/types/array';
2525
/**
2626
* Creates a filled array having a specified length.
2727
*
28-
* The function recognizes the following data types:
29-
*
30-
* - `float64`: double-precision floating-point numbers (IEEE 754)
31-
* - `float32`: single-precision floating-point numbers (IEEE 754)
32-
* - `complex128`: double-precision complex floating-point numbers
33-
* - `complex64`: single-precision complex floating-point numbers
34-
* - `int32`: 32-bit two's complement signed integers
35-
* - `uint32`: 32-bit unsigned integers
36-
* - `int16`: 16-bit two's complement signed integers
37-
* - `uint16`: 16-bit unsigned integers
38-
* - `int8`: 8-bit two's complement signed integers
39-
* - `uint8`: 8-bit unsigned integers
40-
* - `uint8c`: 8-bit unsigned integers clamped to `0-255`
41-
* - `generic`: generic JavaScript values
42-
*
4328
* @param length - array length
4429
* @param value - fill value
4530
* @param dtype - data type (default: 'float64')

docs/types/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import full = require( './index' );
3131
full( 10, 1, 'float32' ); // $ExpectType Float32Array
3232
full( 10, z, 'complex128' ); // $ExpectType Complex128Array
3333
full( 10, z, 'complex64' ); // $ExpectType Complex64Array
34+
full( 10, true, 'bool' ); // $ExpectType BooleanArray
3435
full( 10, 1, 'int32' ); // $ExpectType Int32Array
3536
full( 10, 1, 'int16' ); // $ExpectType Int16Array
3637
full( 10, 1, 'int8' ); // $ExpectType Int8Array

0 commit comments

Comments
 (0)