Skip to content

Commit 81b56b3

Browse files
committed
Auto-generated commit
1 parent e844b4f commit 81b56b3

7 files changed

Lines changed: 21 additions & 14 deletions

File tree

.github/.keepalive

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

.github/workflows/publish.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ jobs:
110110
exit 0
111111
fi
112112
rm -rf ./bin/cli
113-
rm test/test.cli.js
114-
rm etc/cli_opts.json
115-
rm docs/usage.txt
113+
rm -f test/test.cli.js
114+
rm -f etc/cli_opts.json
115+
rm -f docs/usage.txt
116116
117117
# For all dependencies, check in all *.js files if they are still used; if not, remove them:
118118
jq -r '.dependencies | keys[]' ./package.json | while read -r dep; do
@@ -149,6 +149,12 @@ jobs:
149149
# Add link definition for CLI package to README.md:
150150
find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/<section class=\"links\">/<section class=\"links\">\n\n[$escapedPkg]: https:\/\/www.npmjs.com\/package\/$escapedPkg/"
151151
152+
# Replace GitHub MathJax equations with SVGs:
153+
- name: 'Replace GitHub MathJax equations with SVGs'
154+
run: |
155+
find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe 's/```math\n([\s\S]+?)\n```\n\n//g'
156+
find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe 's/<!-- <div class="equation"(.*)(<\/div>\s*-->)/<div class="equation"$1<\/div>/sg'
157+
152158
# Replace GitHub links to individual packages with npm links:
153159
- name: 'Replace all GitHub links to individual packages with npm links'
154160
run: |
@@ -162,8 +168,8 @@ jobs:
162168
# Remove unnecessary files:
163169
- name: 'Remove unnecessary files'
164170
run: |
165-
rm docs/repl.txt
166-
rm docs/types/test.ts
171+
rm -f docs/repl.txt
172+
rm -f docs/types/test.ts
167173
168174
# Replace all stdlib GitHub dependencies with the respective npm packages:
169175
- name: 'Replace all stdlib GitHub dependencies with the respective npm packages'

CONTRIBUTORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ Ryan Seal <splrk@users.noreply.github.com>
2828
Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
2929
Shraddheya Shendre <shendreshraddheya@gmail.com>
3030
Stephannie Jiménez Gacha <steff456@hotmail.com>
31+
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
3132
dorrin-sot <59933477+dorrin-sot@users.noreply.github.com>
33+
orimiles5 <97595296+orimiles5@users.noreply.github.com>
3234
rei2hu <rei2hu@users.noreply.github.com>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3618,7 +3618,7 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
36183618
-->
36193619

36203620
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
3621-
[chat-url]: https://gitter.im/stdlib-js/stdlib/
3621+
[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
36223622

36233623
[stdlib]: https://github.com/stdlib-js/stdlib
36243624

lib/defaults.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

lib/main.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ var isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' );
3333
var isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' );
3434
var numel = require( '@stdlib/ndarray-base-numel' );
3535
var parent = require( '@stdlib/ndarray-base-ctor' ); // eslint-disable-line stdlib/no-redeclare
36+
var defaults = require( '@stdlib/ndarray-defaults' );
3637
var inherit = require( '@stdlib/utils-inherit' );
3738
var format = require( '@stdlib/string-format' );
38-
var defaults = require( './defaults.json' );
3939
var iget = require( './iget.js' );
4040
var iset = require( './iset.js' );
4141
var get = require( './get.js' );
@@ -57,6 +57,9 @@ var validate = require( './validate.js' );
5757
*/
5858
var MAX_DIMS = 32767|0;
5959

60+
var INDEX_MODE = defaults.get( 'index_mode' );
61+
var READONLY = false;
62+
6063

6164
// MAIN //
6265

@@ -150,8 +153,8 @@ function ndarray( dtype, buffer, shape, strides, offset, order, options ) {
150153
throw new Error( 'invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.' );
151154
}
152155
opts = {};
153-
opts.mode = defaults.mode;
154-
opts.readonly = defaults.readonly;
156+
opts.mode = INDEX_MODE;
157+
opts.readonly = READONLY;
155158
if ( arguments.length > 6 ) {
156159
err = validate( opts, options );
157160
if ( err ) {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.8",
6464
"@stdlib/ndarray-base-numel": "^0.0.8",
6565
"@stdlib/ndarray-base-strides2order": "^0.0.6",
66+
"@stdlib/ndarray-defaults": "github:stdlib-js/ndarray-defaults#main",
6667
"@stdlib/ndarray-dtypes": "^0.0.9",
6768
"@stdlib/ndarray-index-modes": "^0.0.8",
6869
"@stdlib/ndarray-orders": "^0.0.8",

0 commit comments

Comments
 (0)