Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Nov 1, 2023
1 parent 12819ce commit fcd1f33
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 194 deletions.
1 change: 1 addition & 0 deletions .github/.keepalive
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-11-01T05:52:53.006Z
12 changes: 10 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ jobs:
fi
# Trim leading and trailing whitespace:
dep=$(echo "$dep" | xargs)
version="^$(npm view $dep version)"
version="$(npm view $dep version)"
if [[ -z "$version" ]]; then
continue
fi
version="^$version"
jq -r --arg dep "$dep" --arg version "$version" '.dependencies[$dep] = $version' package.json > package.json.tmp
mv package.json.tmp package.json
done
Expand All @@ -192,7 +196,11 @@ jobs:
fi
# Trim leading and trailing whitespace:
dep=$(echo "$dep" | xargs)
version="^$(npm view $dep version)"
version="$(npm view $dep version)"
if [[ -z "$version" ]]; then
continue
fi
version="^$version"
jq -r --arg dep "$dep" --arg version "$version" '.devDependencies[$dep] = $version' package.json > package.json.tmp
mv package.json.tmp package.json
done
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ Stephannie Jiménez Gacha <steff456@hotmail.com>
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
orimiles5 <97595296+orimiles5@users.noreply.github.com>
rei2hu <reimu@reimu.ws>
Robert Gislason <gztown2216@yahoo.com>
6 changes: 3 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"@stdlib/assert-is-nonnegative-integer": "^0.1.0",
"@stdlib/assert-is-nonnegative-integer-array": "^0.1.0",
"@stdlib/assert-is-plain-object": "^0.1.1",
"@stdlib/complex-float32": "^0.1.0",
"@stdlib/complex-float64": "^0.1.0",
"@stdlib/complex-float32": "^0.1.1",
"@stdlib/complex-float64": "^0.1.1",
"@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0",
"@stdlib/ndarray-base-assert-is-data-type": "^0.1.0",
"@stdlib/ndarray-base-assert-is-index-mode": "^0.1.1",
Expand All @@ -62,7 +62,7 @@
"@stdlib/ndarray-base-iteration-order": "^0.1.1",
"@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.1",
"@stdlib/ndarray-base-numel": "^0.1.1",
"@stdlib/ndarray-base-strides2order": "^0.1.0",
"@stdlib/ndarray-base-strides2order": "^0.1.1",
"@stdlib/ndarray-defaults": "^0.1.1",
"@stdlib/ndarray-dtypes": "^0.1.0",
"@stdlib/ndarray-index-modes": "^0.1.1",
Expand All @@ -76,14 +76,14 @@
"devDependencies": {
"@stdlib/array-complex128": "^0.1.0",
"@stdlib/array-complex64": "^0.1.0",
"@stdlib/array-float32": "^0.1.0",
"@stdlib/array-float64": "^0.1.0",
"@stdlib/array-float32": "^0.1.1",
"@stdlib/array-float64": "^0.1.1",
"@stdlib/assert-has-property": "^0.1.1",
"@stdlib/assert-instance-of": "^0.1.1",
"@stdlib/assert-is-positive-integer": "^0.1.0",
"@stdlib/bench": "^0.1.0",
"@stdlib/complex-imagf": "^0.1.0",
"@stdlib/complex-realf": "^0.1.0",
"@stdlib/complex-imagf": "^0.1.1",
"@stdlib/complex-realf": "^0.1.1",
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
"istanbul": "^0.4.1",
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
Expand Down
186 changes: 4 additions & 182 deletions test/dist/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
* Copyright (c) 2023 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,191 +21,13 @@
// MODULES //

var tape = require( 'tape' );
var instanceOf = require( '@stdlib/assert-instance-of' );
var Complex64Array = require( '@stdlib/array-complex64' );
var ndarray = require( './../../dist' );
var main = require( './../../dist' );


// TESTS //

tape( 'main export is a function', function test( t ) {
tape( 'main export is defined', function test( t ) {
t.ok( true, __filename );
t.strictEqual( typeof ndarray, 'function', 'main export is a function' );
t.end();
});

tape( 'the function is an ndarray constructor', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'generic';
buffer = [ 1.0, 2.0, 3.0, 4.0 ];
shape = [ 2, 2 ];
order = 'row-major';
strides = [ 2, 1 ];
offset = 0;

arr = new ndarray( dtype, buffer, shape, strides, offset, order );

t.strictEqual( instanceOf( arr, ndarray ), true, 'returns an instance' );
t.end();
});

tape( 'the function is an ndarray constructor (complex dtype)', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'complex64';
buffer = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
shape = [ 2, 2 ];
order = 'row-major';
strides = [ 2, 1 ];
offset = 0;

arr = new ndarray( dtype, buffer, shape, strides, offset, order );

t.strictEqual( instanceOf( arr, ndarray ), true, 'returns an instance' );
t.end();
});

tape( 'the function is an ndarray constructor (0d)', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'generic';
buffer = [ 1.0 ];
shape = [];
order = 'row-major';
strides = [ 0 ];
offset = 0;

arr = new ndarray( dtype, buffer, shape, strides, offset, order );

t.strictEqual( instanceOf( arr, ndarray ), true, 'returns an instance' );
t.end();
});

tape( 'the function is an ndarray constructor (0d; complex dtype)', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'complex64';
buffer = new Complex64Array( [ 1.0, 1.0 ] );
shape = [];
order = 'row-major';
strides = [ 0 ];
offset = 0;

arr = new ndarray( dtype, buffer, shape, strides, offset, order );

t.strictEqual( instanceOf( arr, ndarray ), true, 'returns an instance' );
t.end();
});

tape( 'the function is an ndarray constructor (options)', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'generic';
buffer = [ 1.0, 2.0, 3.0, 4.0 ];
shape = [ 2, 2 ];
order = 'row-major';
strides = [ 2, 1 ];
offset = 0;

arr = new ndarray( dtype, buffer, shape, strides, offset, order, {} );

t.strictEqual( instanceOf( arr, ndarray ), true, 'returns an instance' );
t.end();
});

tape( 'the function is an ndarray constructor (0d; options)', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'generic';
buffer = [ 1.0 ];
shape = [];
order = 'row-major';
strides = [ 0 ];
offset = 0;

arr = new ndarray( dtype, buffer, shape, strides, offset, order, {} );

t.strictEqual( instanceOf( arr, ndarray ), true, 'returns an instance' );
t.end();
});

tape( 'the constructor does not require the `new` keyword', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'generic';
buffer = [ 1.0, 2.0, 3.0, 4.0 ];
shape = [ 2, 2 ];
order = 'row-major';
strides = [ 2, 1 ];
offset = 0;

arr = ndarray( dtype, buffer, shape, strides, offset, order );

t.strictEqual( instanceOf( arr, ndarray ), true, 'returns an instance' );
t.end();
});

tape( 'the constructor does not require the `new` keyword (options)', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'generic';
buffer = [ 1.0, 2.0, 3.0, 4.0 ];
shape = [ 2, 2 ];
order = 'row-major';
strides = [ 2, 1 ];
offset = 0;

arr = ndarray( dtype, buffer, shape, strides, offset, order, {} );

t.strictEqual( instanceOf( arr, ndarray ), true, 'returns an instance' );
t.strictEqual( main !== void 0, true, 'main export is defined' );
t.end();
});

0 comments on commit fcd1f33

Please sign in to comment.