We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 296ea30 commit b81fb3cCopy full SHA for b81fb3c
lib/node_modules/@stdlib/utils/unzip/lib/main.js
@@ -83,19 +83,19 @@ function unzip( arr, idx ) {
83
}
84
numVals = idx.length;
85
} else {
86
- idx = new Array( numVals );
+ idx = [];
87
for ( i = 0; i < numVals; i++ ) {
88
- idx[ i ] = i;
+ idx.push( i );
89
90
91
- out = new Array( numVals );
+ out = [];
92
for ( j = 0; j < numVals; j++ ) {
93
- tmp = new Array( len );
+ tmp = [];
94
k = idx[ j ];
95
for ( i = 0; i < len; i++ ) {
96
- tmp[ i ] = arr[ i ][ k ];
+ tmp.push( arr[ i ][ k ] );
97
98
- out[ j ] = tmp;
+ out.push( tmp );
99
100
return out;
101
0 commit comments