Skip to content

Commit 3bf38fe

Browse files
committed
Refactor use of Array constructor
1 parent ad7bd60 commit 3bf38fe

37 files changed

Lines changed: 55 additions & 55 deletions

File tree

lib/node_modules/@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ var isBufferLengthCompatibleShape = require( '@stdlib/ndarray/base/assert/is-buf
4646

4747
Returns a `boolean` indicating if a buffer `length` is compatible with a provided `shape` array.
4848

49+
<!-- eslint-disable id-length -->
50+
4951
```javascript
5052
var shape = [ 2, 2 ];
5153

@@ -89,7 +91,7 @@ var i;
8991

9092
len = 500; // buffer length
9193

92-
shape = new Array( 3 );
94+
shape = [ 0, 0, 0 ];
9395
for ( i = 0; i < 100; i++ ) {
9496
// Generate a random array shape:
9597
shape[ 0 ] = discreteUniform( 1, 10 );

lib/node_modules/@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var i;
2828

2929
len = 500; // buffer length
3030

31-
shape = new Array( 3 );
31+
shape = [ 0, 0, 0 ];
3232
for ( i = 0; i < 100; i++ ) {
3333
// Generate a random array shape:
3434
shape[ 0 ] = discreteUniform( 1, 10 );

lib/node_modules/@stdlib/ndarray/base/assert/is-buffer-length-compatible/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ var i;
9292
var j;
9393

9494
len = 500; // buffer length
95-
shape = new Array( 3 );
95+
shape = [ 0, 0, 0 ];
9696

9797
for ( i = 0; i < 100; i++ ) {
9898
// Generate a random array shape:

lib/node_modules/@stdlib/ndarray/base/assert/is-buffer-length-compatible/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var i;
3333
var j;
3434

3535
len = 500; // buffer length
36-
shape = new Array( 3 );
36+
shape = [ 0, 0, 0 ];
3737

3838
for ( i = 0; i < 100; i++ ) {
3939
// Generate a random array shape:

lib/node_modules/@stdlib/ndarray/base/assert/is-column-major-contiguous/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ var bool;
9696
var i;
9797
var j;
9898

99-
shape = new Array( 3 );
99+
shape = [ 0, 0, 0 ];
100100

101101
for ( i = 0; i < 100; i++ ) {
102102
// Generate a random array shape:

lib/node_modules/@stdlib/ndarray/base/assert/is-column-major-contiguous/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var bool;
3131
var i;
3232
var j;
3333

34-
shape = new Array( 3 );
34+
shape = [ 0, 0, 0 ];
3535

3636
for ( i = 0; i < 100; i++ ) {
3737
// Generate a random array shape:

lib/node_modules/@stdlib/ndarray/base/assert/is-column-major/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) {
3737
var out;
3838
var i;
3939

40-
shape = new Array( 3 );
40+
shape = [ 0, 0, 0 ];
4141
shape[ 0 ] = discreteUniform( 0, 10 );
4242
shape[ 1 ] = discreteUniform( 0, 10 );
4343
shape[ 2 ] = discreteUniform( 0, 10 );

lib/node_modules/@stdlib/ndarray/base/assert/is-contiguous/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ var bool;
9696
var i;
9797
var j;
9898

99-
shape = new Array( 3 );
99+
shape = [ 0, 0, 0 ];
100100

101101
for ( i = 0; i < 100; i++ ) {
102102
// Generate a random array shape:

lib/node_modules/@stdlib/ndarray/base/assert/is-contiguous/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var bool;
3131
var i;
3232
var j;
3333

34-
shape = new Array( 3 );
34+
shape = [ 0, 0, 0 ];
3535

3636
for ( i = 0; i < 100; i++ ) {
3737
// Generate a random array shape:

lib/node_modules/@stdlib/ndarray/base/assert/is-row-major-contiguous/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ var bool;
9696
var i;
9797
var j;
9898

99-
shape = new Array( 3 );
99+
shape = [ 0, 0, 0 ];
100100

101101
for ( i = 0; i < 100; i++ ) {
102102
// Generate a random array shape:

0 commit comments

Comments
 (0)