Skip to content

Commit ec5a8de

Browse files
committed
docs: fix miscellaneous TSDoc issues in @stdlib/math declarations
Correct documentation-only issues flagged by an audit: - `base/utils/float64-epsilon-difference`: add the `@throws must provide a recognized scale function name` tag that the sibling `relative-difference` documents. `epsilonDifference` accepts the same `scale` argument and delegates to `reldiff`, which throws on an unrecognized scale-name string. - `special/abs`: remove an unused `@stdlib/ndarray/to-array` require from an `@example`, and correct the malformed `// returns <ndarray>[ ... ]` annotations to `// returns <ndarray>` (the operations return ndarrays, not array literals). This PR addresses only the TypeScript declaration files. The matching namespace aggregators are generated and will pick up these fixes on regeneration. --- 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_pkg_readmes status: na - task: lint_markdown_docs status: na - 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: 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 ---
1 parent 34f9bab commit ec5a8de

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

  • lib/node_modules/@stdlib/math

lib/node_modules/@stdlib/math/base/utils/float64-epsilon-difference/docs/types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ type ScaleNames = 'max-abs' | 'max' | 'min-abs' | 'min' | 'mean-abs' | 'mean' |
6060
* @param x - first number
6161
* @param y - second number
6262
* @param scale - scale function (default: 'max-abs')
63+
* @throws must provide a recognized scale function name
6364
* @returns relative difference in units of double-precision floating-point epsilon
6465
*
6566
* @example

lib/node_modules/@stdlib/math/special/abs/docs/types/index.d.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ interface UnaryFunction {
6969
* // returns <ndarray>
7070
*
7171
* var y = abs( x );
72-
* // returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ]
72+
* // returns <ndarray>
7373
*/
7474
( x: InputArray, options?: Options ): typedndarray<number>; // FIXME: we lose type specificity here, as the output ndarray data type is determined according to the output data type policy in conjunction with the `dtype` option
7575

@@ -87,7 +87,7 @@ interface UnaryFunction {
8787
* var y = array( [ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ] );
8888
*
8989
* var z = abs.assign( x, y );
90-
* // returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ]
90+
* // returns <ndarray>
9191
*
9292
* var bool = ( z === y );
9393
* // returns true
@@ -108,17 +108,16 @@ interface UnaryFunction {
108108
* var x = array( [ [ -1.0, -2.0 ], [ -3.0, -4.0 ] ] );
109109
*
110110
* var y = abs( x );
111-
* // returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ]
111+
* // returns <ndarray>
112112
*
113113
* @example
114-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
115114
* var array = require( '@stdlib/ndarray/array' );
116115
*
117116
* var x = array( [ [ -1.0, -2.0 ], [ -3.0, -4.0 ] ] );
118117
* var y = array( [ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ] );
119118
*
120119
* var z = abs.assign( x, y );
121-
* // returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ]
120+
* // returns <ndarray>
122121
*
123122
* var bool = ( z === y );
124123
* // returns true

0 commit comments

Comments
 (0)