Skip to content

Commit 0f753ef

Browse files
committed
refactor: use string interpolation
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent e5a55ef commit 0f753ef

File tree

1 file changed

+2
-1
lines changed
  • lib/node_modules/@stdlib/ndarray/base/assign/lib

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/ndarray/base/assign/lib/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ var ndarray2object = require( '@stdlib/ndarray/base/ndarraylike2object' );
3333
var reinterpretComplex = require( '@stdlib/strided/base/reinterpret-complex' );
3434
var reinterpretBoolean = require( '@stdlib/strided/base/reinterpret-boolean' );
3535
var gscal = require( '@stdlib/blas/base/gscal' );
36+
var format = require( '@stdlib/string/format' );
3637
var blockedaccessorassign2d = require( './2d_blocked_accessors.js' );
3738
var blockedaccessorassign3d = require( './3d_blocked_accessors.js' );
3839
var blockedaccessorassign4d = require( './4d_blocked_accessors.js' );
@@ -294,7 +295,7 @@ function assign( arrays ) {
294295
shy = y.shape;
295296
ndims = shx.length;
296297
if ( ndims !== shy.length ) {
297-
throw new Error( 'invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == '+ndims+'. ndims(y) == '+shy.length+'.' );
298+
throw new Error( format( 'invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == %d. ndims(y) == %d.', ndims, shy.length ) );
298299
}
299300
// Determine whether we can avoid iteration altogether...
300301
if ( ndims === 0 ) {

0 commit comments

Comments
 (0)