From aada0ab96d5c8cac867c301de6ea492605c62609 Mon Sep 17 00:00:00 2001 From: Uday Kakade Date: Thu, 16 Apr 2026 07:25:35 +0530 Subject: [PATCH 1/3] Improve doctests in ndarray instance in ndarray/with --- lib/node_modules/@stdlib/ndarray/with/README.md | 5 +---- lib/node_modules/@stdlib/ndarray/with/docs/repl.txt | 3 +-- lib/node_modules/@stdlib/ndarray/with/docs/types/index.d.ts | 5 +---- lib/node_modules/@stdlib/ndarray/with/lib/index.js | 5 +---- lib/node_modules/@stdlib/ndarray/with/lib/main.js | 5 +---- 5 files changed, 5 insertions(+), 18 deletions(-) diff --git a/lib/node_modules/@stdlib/ndarray/with/README.md b/lib/node_modules/@stdlib/ndarray/with/README.md index 323d75611679..e99079a0605f 100644 --- a/lib/node_modules/@stdlib/ndarray/with/README.md +++ b/lib/node_modules/@stdlib/ndarray/with/README.md @@ -53,10 +53,7 @@ var x = zeros( [ 2, 2 ], { // returns var out = ndarrayWith( x, [ 0, 0 ], 1.0 ); -// returns - -var v = out.get( 0, 0 ); -// returns 1.0 +// returns [ 1.0 ] ``` The function accepts the following arguments: diff --git a/lib/node_modules/@stdlib/ndarray/with/docs/repl.txt b/lib/node_modules/@stdlib/ndarray/with/docs/repl.txt index b150afdae620..9e88d950edf2 100644 --- a/lib/node_modules/@stdlib/ndarray/with/docs/repl.txt +++ b/lib/node_modules/@stdlib/ndarray/with/docs/repl.txt @@ -23,8 +23,7 @@ -------- > var x = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] ); > var out = {{alias}}( x, [ 0, 0 ], 5 ); - > var v = out.get( 0, 0 ) - 5 + [ 5 ] See Also -------- diff --git a/lib/node_modules/@stdlib/ndarray/with/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/with/docs/types/index.d.ts index dbb5485f685c..14c082feda62 100644 --- a/lib/node_modules/@stdlib/ndarray/with/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/ndarray/with/docs/types/index.d.ts @@ -42,10 +42,7 @@ import { typedndarray } from '@stdlib/types/ndarray'; * var x = ndarray( 'generic', buffer, shape, strides, offset, order ); * * var out = ndarrayWith( x, [ 0, 0 ], 5 ); -* // returns -* -* var v = out.get( 0, 0 ); -* // returns 5 +* // returns [ 5 ] */ declare function ndarrayWith = typedndarray>( x: typedndarray, indices: Array, value: T ): U; diff --git a/lib/node_modules/@stdlib/ndarray/with/lib/index.js b/lib/node_modules/@stdlib/ndarray/with/lib/index.js index 308b608a819e..a17f4099213c 100644 --- a/lib/node_modules/@stdlib/ndarray/with/lib/index.js +++ b/lib/node_modules/@stdlib/ndarray/with/lib/index.js @@ -37,10 +37,7 @@ * // returns * * var out = ndarrayWith( x, [ 0, 0 ], 5 ); -* // returns -* -* var v = out.get( 0, 0 ); -* // returns 5 +* // returns [ 5 ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/ndarray/with/lib/main.js b/lib/node_modules/@stdlib/ndarray/with/lib/main.js index dae26435a0fb..80a6a8fe68ad 100644 --- a/lib/node_modules/@stdlib/ndarray/with/lib/main.js +++ b/lib/node_modules/@stdlib/ndarray/with/lib/main.js @@ -58,10 +58,7 @@ var format = require( '@stdlib/string/format' ); * var x = ndarray( 'generic', buffer, shape, strides, offset, order ); * * var out = ndarrayWith( x, [ 0, 0 ], 5 ); -* // returns -* -* var v = out.get( 0, 0 ); -* // returns 5 +* // returns [ 5 ] */ function ndarrayWith( x, indices, value ) { var args; From 85af9d8db1d794f32ab742b7d59f3d5f1c441e1f Mon Sep 17 00:00:00 2001 From: Uday Kakade Date: Thu, 16 Apr 2026 07:34:31 +0530 Subject: [PATCH 2/3] ndarray/with --- lib/node_modules/@stdlib/ndarray/with/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/ndarray/with/README.md b/lib/node_modules/@stdlib/ndarray/with/README.md index e99079a0605f..f25aea958a7b 100644 --- a/lib/node_modules/@stdlib/ndarray/with/README.md +++ b/lib/node_modules/@stdlib/ndarray/with/README.md @@ -53,7 +53,7 @@ var x = zeros( [ 2, 2 ], { // returns var out = ndarrayWith( x, [ 0, 0 ], 1.0 ); -// returns [ 1.0 ] +// returns [ [ 1, 0 ], [ 0, 0 ] ] ``` The function accepts the following arguments: From 82a593dab870020784a2cda5142babeb8437bb4a Mon Sep 17 00:00:00 2001 From: Uday Kakade Date: Thu, 16 Apr 2026 13:50:03 +0530 Subject: [PATCH 3/3] fix: correct doctest return values in ndarray/with --- 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: skipped - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: passed - 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: passed - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/ndarray/with/docs/repl.txt | 4 ++-- lib/node_modules/@stdlib/ndarray/with/docs/types/index.d.ts | 2 +- lib/node_modules/@stdlib/ndarray/with/lib/index.js | 2 +- lib/node_modules/@stdlib/ndarray/with/lib/main.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/ndarray/with/docs/repl.txt b/lib/node_modules/@stdlib/ndarray/with/docs/repl.txt index 9e88d950edf2..d6924840b942 100644 --- a/lib/node_modules/@stdlib/ndarray/with/docs/repl.txt +++ b/lib/node_modules/@stdlib/ndarray/with/docs/repl.txt @@ -22,8 +22,8 @@ Examples -------- > var x = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] ); - > var out = {{alias}}( x, [ 0, 0 ], 5 ); - [ 5 ] + > var out = {{alias}}( x, [ 0, 0 ], 5 ) + [ [ 5, 2 ], [ 3, 4 ] ] See Also -------- diff --git a/lib/node_modules/@stdlib/ndarray/with/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/with/docs/types/index.d.ts index 14c082feda62..ee6298bb9ad9 100644 --- a/lib/node_modules/@stdlib/ndarray/with/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/ndarray/with/docs/types/index.d.ts @@ -42,7 +42,7 @@ import { typedndarray } from '@stdlib/types/ndarray'; * var x = ndarray( 'generic', buffer, shape, strides, offset, order ); * * var out = ndarrayWith( x, [ 0, 0 ], 5 ); -* // returns [ 5 ] +* // returns [ [ 5, 2 ], [ 3, 4 ] ] */ declare function ndarrayWith = typedndarray>( x: typedndarray, indices: Array, value: T ): U; diff --git a/lib/node_modules/@stdlib/ndarray/with/lib/index.js b/lib/node_modules/@stdlib/ndarray/with/lib/index.js index a17f4099213c..1a508ec879ee 100644 --- a/lib/node_modules/@stdlib/ndarray/with/lib/index.js +++ b/lib/node_modules/@stdlib/ndarray/with/lib/index.js @@ -37,7 +37,7 @@ * // returns * * var out = ndarrayWith( x, [ 0, 0 ], 5 ); -* // returns [ 5 ] +* // returns [ [ 5, 2 ], [ 3, 4 ] ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/ndarray/with/lib/main.js b/lib/node_modules/@stdlib/ndarray/with/lib/main.js index 80a6a8fe68ad..15e48eb0d75f 100644 --- a/lib/node_modules/@stdlib/ndarray/with/lib/main.js +++ b/lib/node_modules/@stdlib/ndarray/with/lib/main.js @@ -58,7 +58,7 @@ var format = require( '@stdlib/string/format' ); * var x = ndarray( 'generic', buffer, shape, strides, offset, order ); * * var out = ndarrayWith( x, [ 0, 0 ], 5 ); -* // returns [ 5 ] +* // returns [ [ 5, 2 ], [ 3, 4 ] ] */ function ndarrayWith( x, indices, value ) { var args;