Skip to content

Commit 1d23784

Browse files
committed
refactor: use accessor utility
1 parent 199d59c commit 1d23784

File tree

1 file changed

+3
-7
lines changed
  • lib/node_modules/@stdlib/ndarray/iter/values/lib

1 file changed

+3
-7
lines changed

lib/node_modules/@stdlib/ndarray/iter/values/lib/main.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );
2727
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
2828
var iteratorSymbol = require( '@stdlib/symbol/iterator' );
2929
var zeros = require( '@stdlib/array/base/zeros' );
30-
var copyIndexed = require( '@stdlib/array/base/copy-indexed' );
30+
var getShape = require( '@stdlib/ndarray/shape' );
3131
var numel = require( '@stdlib/ndarray/base/numel' );
3232
var nextCartesianIndex = require( '@stdlib/ndarray/base/next-cartesian-index' ).assign;
3333
var format = require( '@stdlib/string/format' );
@@ -74,7 +74,6 @@ function nditerValues( x ) {
7474
var FLG;
7575
var idx;
7676
var dim;
77-
var sh;
7877
var N;
7978
var i;
8079

@@ -97,14 +96,11 @@ function nditerValues( x ) {
9796
}
9897
}
9998
// Retrieve input array meta data:
100-
shape = x.shape;
99+
shape = getShape( x );
101100
ndims = shape.length;
102101

103-
// Copy the input shape:
104-
sh = copyIndexed( shape );
105-
106102
// Check whether the input array is empty...
107-
N = numel( sh );
103+
N = numel( shape );
108104
if ( N === 0 ) {
109105
FLG = true;
110106
}

0 commit comments

Comments
 (0)