Skip to content

Commit 896cff8

Browse files
committed
Auto-generated commit
1 parent 0b17479 commit 896cff8

File tree

6 files changed

+22
-8
lines changed

6 files changed

+22
-8
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
timeout-minutes: 5
3939
- name: Replace all GitHub links to individual packages with npm links
4040
run: |
41-
find . -type f -name '*.md' -print0 | xargs -0 sed -Ei 's/@stdlib\/([^:]*)\]: https:\/\/github.com\/stdlib-js/@stdlib\/\1\]: https:\/\/www.npmjs.com\/package\/@stdlib/g'
41+
find . -type f -name '*.md' -print0 | xargs -0 sed -Ei '/tree\/main/b; s/@stdlib\/([^:]*)\]: https:\/\/github.com\/stdlib-js/@stdlib\/\1\]: https:\/\/www.npmjs.com\/package\/@stdlib/g'
4242
- name: Replace all stdlib GitHub dependencies with the respective npm packages
4343
run: |
4444
find package.json -type f -print0 | xargs -0 sed -Ei 's/"github:stdlib-js[^"]*"/"^0.0.x"/g'

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ jobs:
4444
run: |
4545
npm install || npm install || npm install
4646
timeout-minutes: 15
47+
- name: Build native add-on (if present)
48+
run: |
49+
if [ -f "binding.gyp" ]; then
50+
npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild
51+
fi
4752
- name: Run tests
4853
id: tests
4954
run: |

.github/workflows/test_coverage.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ jobs:
4040
run: |
4141
npm install || npm install || npm install
4242
timeout-minutes: 15
43+
- name: Build native add-on (if present)
44+
run: |
45+
if [ -f "binding.gyp" ]; then
46+
npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild
47+
fi
4348
- name: Calculate test coverage
4449
run: |
4550
npm run test-cov || npm run test-cov || npm run test-cov

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Justin Dennison <justin1dennison@gmail.com>
1616
Marcus <mfantham@users.noreply.github.com>
1717
Matt Cochrane <matthew.cochrane.eng@gmail.com>
1818
Milan Raj <rajsite@users.noreply.github.com>
19+
Momtchil Momtchev <momtchil@momtchev.com>
1920
Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
2021
Philipp Burckhardt <pburckhardt@outlook.com>
2122
Ricky Reusser <rsreusser@gmail.com>

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,14 @@ console.log( '%s => %s', 'generic', c );
146146

147147
<!-- /.references -->
148148

149+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
150+
151+
<section class="related">
152+
153+
</section>
154+
155+
<!-- /.related -->
156+
149157
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
150158

151159

lib/main.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,10 @@
2020

2121
// MODULES //
2222

23-
var dtypes = require( '@stdlib/ndarray-dtypes' ).enum;
23+
var enumerate = require( '@stdlib/ndarray-dtypes' ).enumerate;
2424
var dtype = require( '@stdlib/ndarray-base-buffer-dtype' );
2525

2626

27-
// VARIABLES //
28-
29-
var table = dtypes();
30-
31-
3227
// MAIN //
3328

3429
/**
@@ -48,7 +43,7 @@ var table = dtypes();
4843
function dtypeEnum( arr ) {
4944
var dt = dtype( arr );
5045
if ( dt ) {
51-
return table[ dt ];
46+
return enumerate( dt );
5247
}
5348
return null;
5449
}

0 commit comments

Comments
 (0)