Skip to content

Commit 2c8e518

Browse files
committed
Auto-generated commit
1 parent 154d185 commit 2c8e518

17 files changed

+308
-71
lines changed

.gitattributes

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,27 @@
4040
*.mov binary
4141

4242
# Override what is considered "vendored" by GitHub's linguist:
43-
/deps/** linguist-vendored=false
44-
/lib/node_modules/** linguist-vendored=false linguist-generated=false
45-
test/fixtures/** linguist-vendored=false
46-
tools/** linguist-vendored=false
43+
/lib/node_modules/** -linguist-vendored -linguist-generated
4744

48-
# Override what is considered "documentation" by GitHub's linguist:
49-
examples/** linguist-documentation=false
45+
# Configure directories which should *not* be included in GitHub language statistics:
46+
/deps/** linguist-vendored
47+
/dist/** linguist-generated
48+
/workshops/** linguist-vendored
49+
50+
benchmark/** linguist-vendored
51+
docs/* linguist-documentation
52+
etc/** linguist-vendored
53+
examples/** linguist-documentation
54+
scripts/** linguist-vendored
55+
test/** linguist-vendored
56+
tools/** linguist-vendored
57+
58+
# Configure files which should *not* be included in GitHub language statistics:
59+
Makefile linguist-vendored
60+
*.mk linguist-vendored
61+
*.jl linguist-vendored
62+
*.py linguist-vendored
63+
*.R linguist-vendored
64+
65+
# Configure files which should be included in GitHub language statistics:
66+
docs/types/*.d.ts -linguist-documentation

.github/workflows/productionize.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ jobs:
344344
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
345345
with:
346346
status: ${{ job.status }}
347-
steps: ${{ toJson(steps) }}
348347
channel: '#npm-ci'
349348
if: failure()
350349

@@ -518,7 +517,6 @@ jobs:
518517
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
519518
with:
520519
status: ${{ job.status }}
521-
steps: ${{ toJson(steps) }}
522520
channel: '#npm-ci'
523521
if: failure()
524522

@@ -698,7 +696,6 @@ jobs:
698696
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
699697
with:
700698
status: ${{ job.status }}
701-
steps: ${{ toJson(steps) }}
702699
channel: '#npm-ci'
703700
if: failure()
704701

.github/workflows/publish.yml

Lines changed: 4 additions & 1 deletion
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}"
@@ -218,7 +222,6 @@ jobs:
218222
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
219223
with:
220224
status: ${{ job.status }}
221-
steps: ${{ toJson(steps) }}
222225
channel: '#npm-ci'
223226
if: failure()
224227

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,5 @@ jobs:
9595
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
9696
with:
9797
status: ${{ job.status }}
98-
steps: ${{ toJson(steps) }}
9998
channel: '#npm-ci'
10099
if: failure()

.github/workflows/test_bundles.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ jobs:
9494
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
9595
with:
9696
status: ${{ job.status }}
97-
steps: ${{ toJson(steps) }}
9897
channel: '#npm-ci'
9998
if: failure()
10099

@@ -139,7 +138,6 @@ jobs:
139138
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
140139
with:
141140
status: ${{ job.status }}
142-
steps: ${{ toJson(steps) }}
143141
channel: '#npm-ci'
144142
if: failure()
145143

@@ -184,6 +182,5 @@ jobs:
184182
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
185183
with:
186184
status: ${{ job.status }}
187-
steps: ${{ toJson(steps) }}
188185
channel: '#npm-ci'
189186
if: failure()

.github/workflows/test_coverage.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ jobs:
119119
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
120120
with:
121121
status: ${{ job.status }}
122-
steps: ${{ toJson(steps) }}
123122
channel: '#npm-ci'
124123
if: failure()
125124

.github/workflows/test_install.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,5 @@ jobs:
8181
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
8282
with:
8383
status: ${{ job.status }}
84-
steps: ${{ toJson(steps) }}
8584
channel: '#npm-ci'
8685
if: failure()

CHANGELOG.md

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

33
> Package changelog.
44
5-
See [GitHub Releases](https://github.com/stdlib-js/array-empty-like/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+
- [`a3132d2`](https://github.com/stdlib-js/stdlib/commit/a3132d275df3729f7d91008bc81610736622ee7a) - add boolean dtype support to `array/empty-like` [(#2460)](https://github.com/stdlib-js/stdlib/pull/2460)
14+
15+
</section>
16+
17+
<!-- /.features -->
18+
19+
<section class="commits">
20+
21+
### Commits
22+
23+
<details>
24+
25+
- [`a3132d2`](https://github.com/stdlib-js/stdlib/commit/a3132d275df3729f7d91008bc81610736622ee7a) - **feat:** add boolean dtype support to `array/empty-like` [(#2460)](https://github.com/stdlib-js/stdlib/pull/2460) _(by Jaysukh Makvana, 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+
- Jaysukh Makvana
41+
42+
</section>
43+
44+
<!-- /.contributors -->
45+
46+
</section>
47+
48+
<!-- /.release -->
49+
50+
<section class="release" id="v0.2.1">
51+
52+
## 0.2.1 (2024-02-25)
53+
54+
<section class="features">
55+
56+
### Features
57+
58+
- [`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)
59+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017) - update minimum TypeScript version
60+
- [`81b8f6c`](https://github.com/stdlib-js/stdlib/commit/81b8f6cdc8d32eaa189a3b40f522c3f7f2bc84b4) - add `array/empty-like` [(#1041)](https://github.com/stdlib-js/stdlib/pull/1041)
61+
62+
</section>
63+
64+
<!-- /.features -->
65+
66+
<section class="breaking-changes">
67+
68+
### BREAKING CHANGES
69+
70+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017): update minimum TypeScript version
71+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017): update minimum TypeScript version to 4.1
72+
73+
- To migrate, users should upgrade their TypeScript version to at least version 4.1.
74+
75+
</section>
76+
77+
<!-- /.breaking-changes -->
78+
79+
<section class="commits">
80+
81+
### Commits
82+
83+
<details>
84+
85+
- [`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)_
86+
- [`dea49e0`](https://github.com/stdlib-js/stdlib/commit/dea49e03ab5571233e3da26835a6a6d3256d5737) - **docs:** use single quotes in require calls instead of backticks _(by Philipp Burckhardt)_
87+
- [`e3fc2d4`](https://github.com/stdlib-js/stdlib/commit/e3fc2d48bf55690a3ead6cc37eed3472f34561c0) - **docs:** update links _(by Athan Reines)_
88+
- [`df3c9b3`](https://github.com/stdlib-js/stdlib/commit/df3c9b368d8a3dd7dd38f8768deb53c2a780c055) - **build:** remove tslint directives _(by Philipp Burckhardt)_
89+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017) - **feat:** update minimum TypeScript version _(by Philipp Burckhardt)_
90+
- [`81b8f6c`](https://github.com/stdlib-js/stdlib/commit/81b8f6cdc8d32eaa189a3b40f522c3f7f2bc84b4) - **feat:** add `array/empty-like` [(#1041)](https://github.com/stdlib-js/stdlib/pull/1041) _(by Stephannie Jiménez Gacha, Athan Reines)_
91+
92+
</details>
93+
94+
</section>
95+
96+
<!-- /.commits -->
97+
98+
<section class="contributors">
99+
100+
### Contributors
101+
102+
A total of 3 people contributed to this release. Thank you to the following contributors:
103+
104+
- Athan Reines
105+
- Philipp Burckhardt
106+
- Stephannie Jiménez Gacha
107+
108+
</section>
109+
110+
<!-- /.contributors -->
111+
112+
</section>
113+
114+
<!-- /.release -->
115+

CONTRIBUTORS

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Adarsh Palaskar <adarshpalaskar99@gmail.com>
66
Aditya Sapra <adityaework@gmail.com>
77
AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com>
8+
Aleksandr <112382387+alextes90@users.noreply.github.com>
89
Ali Salesi <ali_sal1381@yahoo.com>
910
Aman Bhansali <bhansali.1@iitj.ac.in>
1011
Amit Jimiwal <amitjimiwal45@gmail.com>
@@ -18,13 +19,15 @@ Chinmay Joshi <86140365+JawHawk@users.noreply.github.com>
1819
Christopher Dambamuromo <chridam@gmail.com>
1920
Dan Rose <danoftheroses@gmail.com>
2021
Daniel Killenberger <daniel.killenberger@gmail.com>
22+
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
2123
Dominik Moritz <domoritz@gmail.com>
2224
Dorrin Sotoudeh <dorrinsotoudeh123@gmail.com>
2325
EuniceSim142 <77243938+EuniceSim142@users.noreply.github.com>
2426
Frank Kovacs <fran70kk@gmail.com>
2527
Golden Kumar <103646877+AuenKr@users.noreply.github.com>
2628
Gunj Joshi <gunjjoshi8372@gmail.com>
2729
Harshita Kalani <harshitakalani02@gmail.com>
30+
Hridyanshu <124202756+HRIDYANSHU054@users.noreply.github.com>
2831
Jaimin Godhani <112328542+Jai0401@users.noreply.github.com>
2932
James Gelok <jdgelok@gmail.com>
3033
Jaysukh Makvana <jaysukhmakvana2004@gmail.com>
@@ -60,6 +63,7 @@ Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com>
6063
Raunak Kumar Gupta <raunakmodanwal321@gmail.com>
6164
Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
6265
Ricky Reusser <rsreusser@gmail.com>
66+
Ridam Garg <67867319+RidamGarg@users.noreply.github.com>
6367
Robert Gislason <gztown2216@yahoo.com>
6468
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
6569
Rutam <138517416+performant23@users.noreply.github.com>
@@ -69,8 +73,11 @@ Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
6973
Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
7074
Shivam <11shivam00@gmail.com>
7175
Shraddheya Shendre <shendreshraddheya@gmail.com>
76+
Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
7277
Shubham Mishra <shubh622005@gmail.com>
73-
Snehil Shah <130062020+Snehil-Shah@users.noreply.github.com>
78+
Sivam Das <100067002+Sivam2313@users.noreply.github.com>
79+
Snehil Shah <snehilshah.989@gmail.com>
80+
Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>
7481
Spandan Barve <contact@marsian.dev>
7582
Stephannie Jiménez Gacha <steff456@hotmail.com>
7683
Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com>
@@ -79,8 +86,10 @@ Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
7986
Utkarsh <http://utkarsh11105@gmail.com>
8087
Utkarsh Raj <rajutkarsh2505@gmail.com>
8188
Varad Gupta <varadgupta21@gmail.com>
89+
Xiaochuan Ye <tap91624@gmail.com>
8290
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
8391
naveen <stupiddint@gmail.com>
8492
nishant-s7 <97207366+nishant-s7@users.noreply.github.com>
8593
orimiles5 <97595296+orimiles5@users.noreply.github.com>
94+
rainn <88160429+AmCodesLame@users.noreply.github.com>
8695
rei2hu <reimu@reimu.ws>

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) 2023 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,7 +75,7 @@ var emptyLike = require( '@stdlib/array-empty-like' );
7575

7676
#### emptyLike( x\[, dtype] )
7777

78-
Creates an uninitialized array having the same length and data type as a provided array `x`.
78+
Creates an uninitialized array having the same length and [data type][@stdlib/array/dtypes] as a provided array `x`.
7979

8080
```javascript
8181
var x = [ 1, 2, 3, 4, 5 ];
@@ -84,22 +84,7 @@ var arr = emptyLike( x );
8484
// returns [ 0, 0, 0, 0, 0 ];
8585
```
8686

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

10489
```javascript
10590
var x = [ 1, 1 ];
@@ -256,6 +241,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
256241

257242
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/array-empty-like/main/LICENSE
258243

244+
[@stdlib/array/dtypes]: https://github.com/stdlib-js/array-dtypes
245+
259246
<!-- <related-links> -->
260247

261248
[@stdlib/array/empty]: https://github.com/stdlib-js/array-empty

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) 2023 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.
@@ -96,6 +96,28 @@ bench( pkg+':dtype=float32', function benchmark( b ) {
9696
b.end();
9797
});
9898

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

0 commit comments

Comments
 (0)