WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit dbc772f

Browse files
committed
fix: use correct return type in Routine interface and fix descriptions
--- 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: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - 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 ---
1 parent ae93d82 commit dbc772f

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

lib/node_modules/@stdlib/blas/ext/base/wasm/dapx/docs/types/index.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ interface Module extends ModuleWrapper {
138138
* @param alpha - scalar constant
139139
* @param xptr - input array pointer (i.e., byte offset)
140140
* @param strideX - stride length
141-
* @returns input array
141+
* @returns input array pointer
142142
*
143143
* @example
144144
* var Memory = require( '@stdlib/wasm/memory' );
@@ -192,7 +192,7 @@ interface Module extends ModuleWrapper {
192192
* @param xptr - input array pointer (i.e., byte offset)
193193
* @param strideX - stride length
194194
* @param offsetX - starting index
195-
* @returns sum
195+
* @returns input array pointer
196196
*
197197
* @example
198198
* var Memory = require( '@stdlib/wasm/memory' );
@@ -260,7 +260,7 @@ interface Routine extends ModuleWrapper {
260260
* var out = dapx.main( 3, 5.0, x, 1 );
261261
* // out => <Float64Array>[ 6.0, 3.0, 7.0 ]
262262
*/
263-
main( N: number, alpha: number, x: Float64Array, strideX: number ): number;
263+
main( N: number, alpha: number, x: Float64Array, strideX: number ): Float64Array;
264264

265265
/**
266266
* Adds a scalar constant to each element in a double-precision floating-point strided array using alternative indexing semantics.
@@ -270,7 +270,7 @@ interface Routine extends ModuleWrapper {
270270
* @param x - input array
271271
* @param strideX - stride length
272272
* @param offsetX - starting index
273-
* @returns sum
273+
* @returns input array
274274
*
275275
* @example
276276
* var Float64Array = require( '@stdlib/array/float64' );
@@ -280,7 +280,7 @@ interface Routine extends ModuleWrapper {
280280
* dapx.ndarray( 4, 5.0, x, 2, 1 );
281281
* // x => <Float64Array>[ 2.0, 6.0, 2.0, 3.0, -2.0, 7.0, 3.0, 9.0 ]
282282
*/
283-
ndarray( N: number, alpha: number, x: Float64Array, strideX: number, offsetX: number ): number;
283+
ndarray( N: number, alpha: number, x: Float64Array, strideX: number, offsetX: number ): Float64Array;
284284

285285
/**
286286
* Returns a new WebAssembly module wrapper instance which uses the provided WebAssembly memory instance as its underlying memory.

lib/node_modules/@stdlib/blas/ext/base/wasm/dapx/docs/types/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ import dapx = require( './index' );
2424

2525
// TESTS //
2626

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

31-
dapx.main( x.length, 5.0, x, 1 ); // $ExpectType number
31+
dapx.main( x.length, 5.0, x, 1 ); // $ExpectType Float64Array
3232
}
3333

3434
// The compiler throws an error if the `main` method is provided a first argument which is not a number...
@@ -99,11 +99,11 @@ import dapx = require( './index' );
9999
dapx.main( x.length, x, 1, 10, 2 ); // $ExpectError
100100
}
101101

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

106-
dapx.ndarray( x.length, 5.0, x, 1, 0 ); // $ExpectType number
106+
dapx.ndarray( x.length, 5.0, x, 1, 0 ); // $ExpectType Float64Array
107107
}
108108

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

lib/node_modules/@stdlib/blas/ext/base/wasm/dapx/examples/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ function main() {
3333
var x = oneTo( N, 'float64' );
3434

3535
// Perform computation:
36-
dapx.ndarray( N, 5.0, x, 1, 0 );
36+
var out = dapx.ndarray( N, 5.0, x, 1, 0 );
3737

3838
// Print the results:
39-
console.log( x );
39+
console.log( out );
4040
// => <Float64Array>[ 6.0, 7.0, 8.0, 9.0, 10.0 ]
4141
}
4242

0 commit comments

Comments
 (0)