Skip to content

Commit 76ea5a8

Browse files
headlessNodekgryte
andauthored
feat: add missing tests to ndarray/base/includes
PR-URL: #7304 Ref: #2656 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]>
1 parent 62fd127 commit 76ea5a8

File tree

13 files changed

+22227
-1
lines changed

13 files changed

+22227
-1
lines changed

lib/node_modules/@stdlib/ndarray/base/includes/lib/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ function includes( arrays ) {
305305
}
306306
// Check whether we were provided an empty ndarray...
307307
if ( len === 0 ) {
308-
return true;
308+
// An empty array is a trivial case in which an array does not contain a search element:
309+
return false;
309310
}
310311
// Determine whether the ndarray is one-dimensional and thus readily translates to a one-dimensional strided array...
311312
if ( ndims === 1 ) {

0 commit comments

Comments
 (0)