Skip to content

Commit dc4b42d

Browse files
committed
Release v0.1.0
1 parent c5c91ff commit dc4b42d

File tree

7 files changed

+31
-2737
lines changed

7 files changed

+31
-2737
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ jobs:
182182
fi
183183
# Trim leading and trailing whitespace:
184184
dep=$(echo "$dep" | xargs)
185-
version="^$(npm view $dep version)"
185+
version="$(npm view $dep version)"
186+
if [[ -z "$version" ]]; then
187+
continue
188+
fi
189+
version="^$version"
186190
jq -r --arg dep "$dep" --arg version "$version" '.dependencies[$dep] = $version' package.json > package.json.tmp
187191
mv package.json.tmp package.json
188192
done
@@ -192,7 +196,11 @@ jobs:
192196
fi
193197
# Trim leading and trailing whitespace:
194198
dep=$(echo "$dep" | xargs)
195-
version="^$(npm view $dep version)"
199+
version="$(npm view $dep version)"
200+
if [[ -z "$version" ]]; then
201+
continue
202+
fi
203+
version="^$version"
196204
jq -r --arg dep "$dep" --arg version "$version" '.devDependencies[$dep] = $version' package.json > package.json.tmp
197205
mv package.json.tmp package.json
198206
done

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
374374
[npm-image]: http://img.shields.io/npm/v/@stdlib/ndarray-slice-assign.svg
375375
[npm-url]: https://npmjs.org/package/@stdlib/ndarray-slice-assign
376376

377-
[test-image]: https://github.com/stdlib-js/ndarray-slice-assign/actions/workflows/test.yml/badge.svg?branch=main
378-
[test-url]: https://github.com/stdlib-js/ndarray-slice-assign/actions/workflows/test.yml?query=branch:main
377+
[test-image]: https://github.com/stdlib-js/ndarray-slice-assign/actions/workflows/test.yml/badge.svg?branch=v0.1.0
378+
[test-url]: https://github.com/stdlib-js/ndarray-slice-assign/actions/workflows/test.yml?query=branch:v0.1.0
379379

380380
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/ndarray-slice-assign/main.svg
381381
[coverage-url]: https://codecov.io/github/stdlib-js/ndarray-slice-assign?branch=main

dist/index.js

Lines changed: 1 addition & 1 deletion
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.

lib/main.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ var isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' );
2929
var hasOwnProp = require( '@stdlib/assert-has-own-property' );
3030
var MultiSlice = require( '@stdlib/slice-multi' );
3131
var base = require( '@stdlib/ndarray-base-slice-assign' );
32+
var getShape = require( '@stdlib/ndarray-shape' );
3233
var format = require( '@stdlib/string-format' );
3334

3435

@@ -105,6 +106,7 @@ function sliceAssign( x, y, s ) {
105106
var nargs;
106107
var opts;
107108
var args;
109+
var sh;
108110
var S;
109111
var i;
110112

@@ -130,8 +132,9 @@ function sliceAssign( x, y, s ) {
130132
}
131133
opts.strict = options.strict;
132134
}
133-
if ( nargs === 2 && y.shape.length > 0 ) {
134-
throw new RangeError( format( 'invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', y.shape.join( ',' ), 0 ) );
135+
sh = getShape( y );
136+
if ( nargs === 2 && sh.length > 0 ) {
137+
throw new RangeError( format( 'invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', sh.join( ',' ), 0 ) );
135138
}
136139
}
137140
if ( isMultiSlice( s ) ) {

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stdlib/ndarray-slice-assign",
3-
"version": "0.0.0",
3+
"version": "0.1.0",
44
"description": "Assign element values from a broadcasted input ndarray to corresponding elements in an output ndarray view.",
55
"license": "Apache-2.0",
66
"author": {
@@ -44,7 +44,8 @@
4444
"@stdlib/assert-is-ndarray-like": "^0.1.0",
4545
"@stdlib/assert-is-plain-object": "^0.1.1",
4646
"@stdlib/ndarray-base-assert-is-read-only": "^0.1.1",
47-
"@stdlib/ndarray-base-slice-assign": "github:stdlib-js/ndarray-base-slice-assign#main",
47+
"@stdlib/ndarray-base-slice-assign": "^0.1.0",
48+
"@stdlib/ndarray-shape": "^0.1.0",
4849
"@stdlib/slice-multi": "^0.1.0",
4950
"@stdlib/string-format": "^0.1.1",
5051
"@stdlib/types": "^0.1.0"
@@ -54,10 +55,10 @@
5455
"@stdlib/array-typed": "^0.1.0",
5556
"@stdlib/array-zeros": "^0.1.0",
5657
"@stdlib/bench": "^0.1.0",
57-
"@stdlib/complex-float32": "^0.1.0",
58-
"@stdlib/complex-float64": "^0.1.0",
59-
"@stdlib/complex-imag": "^0.1.0",
60-
"@stdlib/complex-real": "^0.1.0",
58+
"@stdlib/complex-float32": "^0.1.1",
59+
"@stdlib/complex-float64": "^0.1.1",
60+
"@stdlib/complex-imag": "^0.1.1",
61+
"@stdlib/complex-real": "^0.1.1",
6162
"@stdlib/ndarray-array": "^0.1.0",
6263
"@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.1.0",
6364
"@stdlib/ndarray-base-ctor": "^0.1.0",

0 commit comments

Comments
 (0)