Skip to content

Commit 7eaac76

Browse files
committed
fix: create getters and setters cache variables
1 parent 2df0faf commit 7eaac76

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/node_modules/@stdlib/ndarray/base/where/lib/2d_accessors.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ function where2d( condition, x, y, out, isRowMajor ) {
145145
var xbuf;
146146
var ybuf;
147147
var obuf;
148+
var getc;
149+
var getx;
150+
var gety;
151+
var seto;
148152
var dc0;
149153
var dc1;
150154
var dx0;
@@ -213,9 +217,9 @@ function where2d( condition, x, y, out, isRowMajor ) {
213217
obuf = out.data;
214218

215219
// Cache accessors
220+
getc = condition.accessors[ 0 ];
216221
getx = x.accessors[ 0 ];
217222
gety = y.accessors[ 0 ];
218-
getc = condition.accessors[ 0 ];
219223
seto = out.accessors[ 1 ];
220224

221225
// Iterate over the ndarray dimensions...

0 commit comments

Comments
 (0)