From 9d9cfe6bfa93f25ddc04937256b73045c67412a3 Mon Sep 17 00:00:00 2001 From: Uday Kakade Date: Sun, 19 Apr 2026 00:36:17 +0530 Subject: [PATCH] docs: improve doctests for ndarray instances in blas/ext/base/ndarray/gsorthp --- .../@stdlib/blas/ext/base/ndarray/gsorthp/README.md | 6 +----- .../@stdlib/blas/ext/base/ndarray/gsorthp/docs/repl.txt | 4 +--- .../blas/ext/base/ndarray/gsorthp/docs/types/index.d.ts | 6 +----- .../@stdlib/blas/ext/base/ndarray/gsorthp/lib/index.js | 6 +----- .../@stdlib/blas/ext/base/ndarray/gsorthp/lib/main.js | 6 +----- 5 files changed, 5 insertions(+), 23 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/README.md b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/README.md index 1adae6951383..e8059a51a9b0 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/README.md +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/README.md @@ -42,7 +42,6 @@ Sorts a one-dimensional ndarray using heapsort. ```javascript var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); -var ndarray2array = require( '@stdlib/ndarray/to-array' ); var ndarray = require( '@stdlib/ndarray/base/ctor' ); var xbuf = [ 1.0, -2.0, 3.0, -4.0 ]; @@ -53,10 +52,7 @@ var order = scalar2ndarray( 1.0, { }); var out = gsorthp( [ x, order ] ); -// returns - -var arr = ndarray2array( out ); -// returns [ -4.0, -2.0, 1.0, 3.0 ] +// returns [ -4.0, -2.0, 1.0, 3.0 ] ``` The function has the following parameters: diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/docs/repl.txt index bde7c87f4334..6ba0bce24bae 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/docs/repl.txt +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/docs/repl.txt @@ -31,9 +31,7 @@ > var x = new {{alias:@stdlib/ndarray/ctor}}( dt, xbuf, sh, sx, ox, ord ); > var o = {{alias:@stdlib/ndarray/from-scalar}}( 1.0 ); > {{alias}}( [ x, o ] ) - - > var data = x.data - [ -4.0, -2.0, 1.0, 3.0 ] + [ -4.0, -2.0, 1.0, 3.0 ] See Also -------- diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/docs/types/index.d.ts index 0dd11b9bfc0a..ac077ea2a2f4 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/docs/types/index.d.ts @@ -33,7 +33,6 @@ import { typedndarray, genericndarray } from '@stdlib/types/ndarray'; * @returns input ndarray * * @example -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); * var ndarray = require( '@stdlib/ndarray/base/ctor' ); * @@ -45,10 +44,7 @@ import { typedndarray, genericndarray } from '@stdlib/types/ndarray'; * }); * * var out = gsorthp( [ x, ord ] ); -* // returns -* -* var arr = ndarray2array( out ); -* // returns [ -4.0, -2.0, 1.0, 3.0 ] +* // returns [ -4.0, -2.0, 1.0, 3.0 ] */ declare function gsorthp | genericndarray = typedndarray>( arrays: [ T, typedndarray ] ): T; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/lib/index.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/lib/index.js index 110b21af2e7c..e002e5578021 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/lib/index.js +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/lib/index.js @@ -25,7 +25,6 @@ * * @example * var ndarray = require( '@stdlib/ndarray/base/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); * var gsorthp = require( '@stdlib/blas/ext/base/ndarray/gsorthp' ); * @@ -37,10 +36,7 @@ * }); * * var out = gsorthp( [ x, ord ] ); -* // returns -* -* var arr = ndarray2array( out ); -* // returns [ -4.0, -2.0, 1.0, 3.0 ] +* // returns [ -4.0, -2.0, 1.0, 3.0 ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/lib/main.js index aa91874f2cc6..388cc1d82187 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/lib/main.js +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gsorthp/lib/main.js @@ -37,7 +37,6 @@ var strided = require( '@stdlib/blas/ext/base/gsorthp' ).ndarray; * @returns {Object} input ndarray * * @example -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); * var ndarray = require( '@stdlib/ndarray/base/ctor' ); * @@ -49,10 +48,7 @@ var strided = require( '@stdlib/blas/ext/base/gsorthp' ).ndarray; * }); * * var out = gsorthp( [ x, ord ] ); -* // returns -* -* var arr = ndarray2array( out ); -* // returns [ -4.0, -2.0, 1.0, 3.0 ] +* // returns [ -4.0, -2.0, 1.0, 3.0 ] */ function gsorthp( arrays ) { var ord;