Skip to content

Commit 551e995

Browse files
committed
Fix formatting bug and update broken tests
1 parent 37f70dc commit 551e995

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

lib/node_modules/@stdlib/ndarray/ctor/lib/set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function set() {
6161
M = this._submode.length;
6262
for ( i = 0; i < arguments.length-1; i++ ) {
6363
if ( !isInteger( arguments[ i ] ) ) {
64-
throw new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%u`.', i, arguments[ i ] ) );
64+
throw new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%s`.', i, arguments[ i ] ) );
6565
}
6666
ind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len
6767
idx += this._strides[ i ] * ind;

lib/node_modules/@stdlib/ndarray/ctor/test/test.instance.tojson.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ tape( 'an ndarray constructor returns an instance which has a custom `toJSON()`
6868
'shape': [ 2, 2 ],
6969
'strides': [ 2, 1 ],
7070
'order': 'row-major',
71-
'flags': {}
71+
'flags': {
72+
'READONLY': false
73+
}
7274
};
7375
actual = arr.toJSON();
7476
t.deepEqual( actual, expected, 'returns expected value' );
@@ -107,7 +109,9 @@ tape( 'an ndarray constructor returns an instance which has a custom `toJSON()`
107109
'shape': [ 2, 2 ],
108110
'strides': [ 1, 2 ],
109111
'order': 'column-major',
110-
'flags': {}
112+
'flags': {
113+
'READONLY': false
114+
}
111115
};
112116
actual = arr.toJSON();
113117
t.deepEqual( actual, expected, 'returns expected value' );
@@ -146,7 +150,9 @@ tape( 'an ndarray constructor returns an instance which has a custom `toJSON()`
146150
'shape': [],
147151
'strides': [ 0 ],
148152
'order': 'column-major',
149-
'flags': {}
153+
'flags': {
154+
'READONLY': false
155+
}
150156
};
151157
actual = arr.toJSON();
152158
t.deepEqual( actual, expected, 'returns expected value' );
@@ -185,7 +191,9 @@ tape( 'an ndarray constructor returns an instance which has a custom `toJSON()`
185191
'shape': [ 2, 2 ],
186192
'strides': [ 2, 1 ],
187193
'order': 'row-major',
188-
'flags': {}
194+
'flags': {
195+
'READONLY': false
196+
}
189197
};
190198
actual = arr.toJSON();
191199
t.deepEqual( actual, expected, 'returns expected value' );

0 commit comments

Comments
 (0)