Skip to content

Commit 8cabbc9

Browse files
committed
Remove variable declaration
1 parent fbc5e58 commit 8cabbc9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/node_modules/@stdlib/ndarray/base/ctor/lib/is_contiguous.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,13 @@ var BUFFER = [ 0, 0 ]; // WARNING: in C, this is not thread safe
4242
* @returns {boolean} boolean indicating if an array is contiguous
4343
*/
4444
function isContiguous( len, shape, strides, offset, iterationOrder ) {
45-
var idx;
46-
4745
// If an array does not contain any elements, then no data to store, and, if the array is unordered, adjacent array elements are not guaranteed to be stored next to each other.
4846
if ( len === 0 || iterationOrder === 0 ) {
4947
return false;
5048
}
5149
// Ensure that the array is compatible with a single memory segment:
52-
idx = minmaxViewBufferIndex( BUFFER, shape, strides, offset );
53-
return ( len === ( idx[1]-idx[0]+1 ) );
50+
minmaxViewBufferIndex( BUFFER, shape, strides, offset );
51+
return ( len === ( BUFFER[1]-BUFFER[0]+1 ) );
5452
}
5553

5654

0 commit comments

Comments
 (0)