Skip to content

Commit 0e246db

Browse files
committed
refactor: resolve dtype string and update documented type
--- 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: skipped - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 88745e0 commit 0e246db

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/node_modules/@stdlib/ndarray/base/binary-reduce-strided1d-dispatch/docs/repl.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
options: Object (optional)
7373
Function options.
7474

75-
options.dtype: string (optional)
75+
options.dtype: string|DataType (optional)
7676
Output array data type. Setting this option overrides the output data
7777
type policy.
7878

lib/node_modules/@stdlib/ndarray/base/binary-reduce-strided1d-dispatch/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function BinaryStrided1dDispatch( table, idtypes, odtypes, policies ) {
193193
* @param {Options} [options] - function options
194194
* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction
195195
* @param {boolean} [options.keepdims=false] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions
196-
* @param {string} [options.dtype] - output ndarray data type
196+
* @param {*} [options.dtype] - output ndarray data type
197197
* @throws {TypeError} first argument must be an ndarray-like object
198198
* @throws {TypeError} second argument must be an ndarray-like object
199199
* @throws {TypeError} options argument must be an object

lib/node_modules/@stdlib/ndarray/base/binary-reduce-strided1d-dispatch/lib/validate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var format = require( '@stdlib/string/format' );
4343
* @param {Options} options - function options
4444
* @param {boolean} [options.keepdims] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions
4545
* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction
46-
* @param {string} [options.dtype] - output ndarray data type
46+
* @param {*} [options.dtype] - output ndarray data type
4747
* @returns {(Error|null)} null or an error object
4848
*
4949
* @example
@@ -85,7 +85,7 @@ function validate( opts, ndims, dtypes, options ) {
8585
}
8686
if ( hasOwnProp( options, 'dtype' ) ) {
8787
opts.dtype = options.dtype;
88-
if ( !contains( dtypes, opts.dtype ) ) {
88+
if ( !contains( dtypes, String( opts.dtype ) ) ) {
8989
return new TypeError( format( 'invalid option. `%s` option must be one of the following: "%s". Option: `%s`.', 'dtype', join( dtypes, '", "' ), opts.dtype ) );
9090
}
9191
}

0 commit comments

Comments
 (0)