Skip to content

Commit 30316d1

Browse files
committed
fix: add missing case
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 4f0e615 commit 30316d1

File tree

1 file changed

+38
-0
lines changed
  • lib/node_modules/@stdlib/ndarray/base/includes/test

1 file changed

+38
-0
lines changed

lib/node_modules/@stdlib/ndarray/base/includes/test/test.5d.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,6 +1732,44 @@ tape( 'the function tests whether a 5-dimensional ndarray contains a specified v
17321732
t.end();
17331733
});
17341734

1735+
tape( 'the function tests whether a 5-dimensional ndarray contains a specified value (column-major, non-contiguous, large arrays, complex)', function test( t ) {
1736+
var actual;
1737+
var bsize;
1738+
var xbuf;
1739+
var ord;
1740+
var sh;
1741+
var st;
1742+
var dt;
1743+
var o;
1744+
var x;
1745+
var v;
1746+
1747+
dt = 'complex128';
1748+
ord = 'column-major';
1749+
1750+
bsize = blockSize( dt );
1751+
sh = [ 2, 1, 2, 1, bsize*2 ];
1752+
st = [ 2, 4, -4, -8, 8 ];
1753+
o = strides2offset( sh, st );
1754+
xbuf = oneTo( numel( sh )*4, 'float64' );
1755+
1756+
x = ndarray( dt, new Complex128Array( xbuf ), sh, st, o, ord );
1757+
1758+
v = scalar2ndarray( new Complex128( 3.0, 4.0 ), {
1759+
'dtype': 'complex128'
1760+
});
1761+
actual = includes( [ x, v ] );
1762+
t.strictEqual( actual, false, 'returns expected value' );
1763+
1764+
v = scalar2ndarray( new Complex128( 5.0, 6.0 ), {
1765+
'dtype': 'complex128'
1766+
});
1767+
actual = includes( [ x, v ] );
1768+
t.strictEqual( actual, true, 'returns expected value' );
1769+
1770+
t.end();
1771+
});
1772+
17351773
tape( 'the function tests whether a 5-dimensional ndarray contains a specified value (column-major, contiguous, accessors)', function test( t ) {
17361774
var actual;
17371775
var ord;

0 commit comments

Comments
 (0)