diff --git a/lib/main.js b/lib/main.js index ff57d29..22811ae 100644 --- a/lib/main.js +++ b/lib/main.js @@ -23,7 +23,7 @@ var isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); var trunc = require( '@stdlib/math-base-special-trunc' ); var abs = require( '@stdlib/math-base-special-abs' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -89,7 +89,7 @@ function bind2vind( shape, strides, offset, order, idx, mode ) { idx += len; } if ( idx < 0 || idx >= len ) { - throw new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) ); + throw new RangeError( format( '0i35E', len, idx ) ); } } // The approach which follows is to resolve a buffer index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the array view (i.e., where all strides are positive and offset is 0)... diff --git a/package.json b/package.json index f13d89d..1eb36e2 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@stdlib/ndarray-base-assert-is-column-major-string": "^0.1.1", "@stdlib/ndarray-index-modes": "^0.2.3", "@stdlib/ndarray-orders": "^0.2.3", - "@stdlib/string-format": "^0.2.3", + "@stdlib/error-tools-fmtprodmsg": "^0.2.3", "@stdlib/types": "^0.5.1", "@stdlib/utils-library-manifest": "^0.2.4", "@stdlib/error-tools-fmtprodmsg": "^0.2.3"