Skip to content

Commit

Permalink
docs: update descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-095 committed Oct 17, 2024
1 parent 91e7b2e commit 1ffb1d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions lib/node_modules/@stdlib/blas/base/dnrm2-wasm/docs/repl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@
--------
// Standard Usage:
> var x = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 2.0 ] );
> {{alias}}.main( x.length, x, 1 )
> var out = {{alias}}.main( x.length, x, 1 )
3.0

// Using `N` and `stride` parameters:
> x = new {{alias:@stdlib/array/float64}}( [ -2.0, 1.0, 1.0, -5.0, 2.0, -1.0 ] );
> {{alias}}.main( 3, x, 2 )
> out = {{alias}}.main( 3, x, 2 )
3.0

// Using view offsets:
> var x0 = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0 ] );
> var x1 = new {{alias:@stdlib/array/float64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
> {{alias}}.main( 3, x1, 2 )
> out = {{alias}}.main( 3, x1, 2 )
3.0


Expand Down Expand Up @@ -76,12 +76,12 @@
--------
// Standard Usage:
> var x = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 2.0 ] );
> {{alias}}.ndarray( x.length, x, 1, 0 )
> var out = {{alias}}.ndarray( x.length, x, 1, 0 )
3.0

// Using offset parameter:
> var x = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0 ] );
> {{alias}}.ndarray( 3, x, 2, 1 )
> out = {{alias}}.ndarray( 3, x, 2, 1 )
3.0


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ interface Routine extends ModuleWrapper {
* var out = dnrm2.main( x.length, 5.0, x, 1, y, 1 );
* // returns 7.42
*/
main( N: number, x: Float64Array, strideX: number ): Float64Array;
main( N: number, x: Float64Array, strideX: number ): number;

/**
* Computes the L2-norm of a double-precision floating-point vector using alternative indexing semantics.
Expand All @@ -240,7 +240,7 @@ interface Routine extends ModuleWrapper {
* var out = dnrm2.ndarray( x.length, x, 1, 0 );
* // returns 7.42
*/
ndarray( N: number, x: Float64Array, strideX: number, offsetX: number ): Float64Array;
ndarray( N: number, x: Float64Array, strideX: number, offsetX: number ): number;

/**
* Returns a new WebAssembly module wrapper instance which uses the provided WebAssembly memory instance as its underlying memory.
Expand Down Expand Up @@ -305,7 +305,7 @@ interface Routine extends ModuleWrapper {
*
* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
*
* dnrm2.ndarray( x.length, x, 1, 0 );
* var out = dnrm2.ndarray( x.length, x, 1, 0 );
* // returns 7.42
*/
declare var dnrm2: Routine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import dnrm2 = require( './index' );

// TESTS //

// Attached to the main export is a `main` method which returns a Float64Array...
// Attached to the main export is a `main` method which returns a number...
{
const x = new Float64Array( 10 );

dnrm2.main( x.length, x, 1 ); // $ExpectType Float64Array
dnrm2.main( x.length, x, 1 ); // $ExpectType number
}

// The compiler throws an error if the `main` method is provided a first argument which is not a number...
Expand Down Expand Up @@ -84,11 +84,11 @@ import dnrm2 = require( './index' );
dnrm2.main( x.length, x, 1, 10 ); // $ExpectError
}

// Attached to main export is an `ndarray` method which returns a Float64Array...
// Attached to main export is an `ndarray` method which returns a number...
{
const x = new Float64Array( 10 );

dnrm2.ndarray( x.length, x, 1, 0 ); // $ExpectType Float64Array
dnrm2.ndarray( x.length, x, 1, 0 ); // $ExpectType number
}

// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
Expand Down

0 comments on commit 1ffb1d4

Please sign in to comment.