Skip to content

Commit 2e393b9

Browse files
committed
fix: apply suggestions from code review
--- 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: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - 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: na - task: lint_license_headers status: passed ---
1 parent 6c320f6 commit 2e393b9

8 files changed

Lines changed: 14 additions & 15 deletions

File tree

lib/node_modules/@stdlib/blas/ext/base/dcartesian-power/lib/ndarray.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ var pow = require( '@stdlib/math/base/special/pow' );
3232
* @param {NonNegativeInteger} k - power
3333
* @param {Float64Array} x - input array
3434
* @param {integer} strideX - stride length
35-
* @param {integer} offsetX - starting index
35+
* @param {NonNegativeInteger} offsetX - starting index
3636
* @param {Float64Array} out - output array
3737
* @param {integer} strideOut1 - stride length between consecutive output pairs
3838
* @param {integer} strideOut2 - stride length between elements within each output pair
39-
* @param {integer} offsetOut - starting index
39+
* @param {NonNegativeInteger} offsetOut - starting index
4040
* @returns {Float64Array} output array
4141
*
4242
* @example

lib/node_modules/@stdlib/blas/ext/base/dcartesian-power/lib/ndarray.native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ var addon = require( './../src/addon.node' );
3434
* @param {NonNegativeInteger} k - power
3535
* @param {Float64Array} x - input array
3636
* @param {integer} strideX - stride length
37-
* @param {integer} offsetX - starting index
37+
* @param {NonNegativeInteger} offsetX - starting index
3838
* @param {Float64Array} out - output array
3939
* @param {integer} strideOut1 - stride length between consecutive output pairs
4040
* @param {integer} strideOut2 - stride length between elements within each output pair
41-
* @param {integer} offsetOut - starting index
41+
* @param {NonNegativeInteger} offsetOut - starting index
4242
* @returns {Float64Array} output array
4343
*
4444
* @example

lib/node_modules/@stdlib/blas/ext/base/dcartesian-power/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
"@stdlib/strided/base/stride2offset",
4242
"@stdlib/napi/export",
4343
"@stdlib/napi/argv",
44-
"@stdlib/napi/argv-float64array",
4544
"@stdlib/napi/argv-int64",
46-
"@stdlib/napi/argv-strided-float64array"
45+
"@stdlib/napi/argv-strided-float64array",
46+
"@stdlib/napi/argv-strided-float64array2d"
4747
]
4848
},
4949
{

lib/node_modules/@stdlib/blas/ext/base/dcartesian-power/src/addon.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
*/
1818

1919
#include "stdlib/blas/ext/base/dcartesianpower.h"
20+
#include "stdlib/math/base/special/pow.h"
2021
#include "stdlib/blas/base/shared.h"
2122
#include "stdlib/napi/export.h"
2223
#include "stdlib/napi/argv.h"
2324
#include "stdlib/napi/argv_int64.h"
24-
#include "stdlib/napi/argv_float64array.h"
2525
#include "stdlib/napi/argv_strided_float64array.h"
26+
#include "stdlib/napi/argv_strided_float64array2d.h"
2627
#include <node_api.h>
2728

2829
/**
@@ -40,8 +41,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
4041
STDLIB_NAPI_ARGV_INT64( env, strideOut1, argv, 5 );
4142
STDLIB_NAPI_ARGV_INT64( env, strideOut2, argv, 6 );
4243
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 2 );
43-
STDLIB_NAPI_ARGV_FLOAT64ARRAY( env, Out, out_len, argv, 4 );
44-
(void)out_len;
44+
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY2D( env, Out, stdlib_base_pow( N, k ), k, strideOut1, strideOut2, argv, 4 );
4545
API_SUFFIX(stdlib_strided_dcartesian_power)( N, k, X, strideX, Out, strideOut1, strideOut2 );
4646
return NULL;
4747
}
@@ -63,8 +63,7 @@ static napi_value addon_method( napi_env env, napi_callback_info info ) {
6363
STDLIB_NAPI_ARGV_INT64( env, strideOut2, argv, 7 );
6464
STDLIB_NAPI_ARGV_INT64( env, offsetOut, argv, 8 );
6565
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 2 );
66-
STDLIB_NAPI_ARGV_FLOAT64ARRAY( env, Out, out_len, argv, 5 );
67-
(void)out_len;
66+
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY2D( env, Out, stdlib_base_pow( N, k ), k, strideOut1, strideOut2, argv, 5 );
6867
API_SUFFIX(stdlib_strided_dcartesian_power_ndarray)( N, k, X, strideX, offsetX, Out, strideOut1, strideOut2, offsetOut );
6968
return NULL;
7069
}

lib/node_modules/@stdlib/blas/ext/base/dcartesian-power/test/test.dcartesianpower.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ tape( 'the function returns a reference to the output array', function test( t )
9999
t.end();
100100
});
101101

102-
tape( 'if provided an `N` or `k` parameter less than or equal to `0`, the function returns `out` unchanged', function test( t ) {
102+
tape( 'if provided an `N` or `k` parameter equal to `0`, the function returns `out` unchanged', function test( t ) {
103103
var expected;
104104
var out;
105105
var x;

lib/node_modules/@stdlib/blas/ext/base/dcartesian-power/test/test.dcartesianpower.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ tape( 'the function returns a reference to the output array', opts, function tes
108108
t.end();
109109
});
110110

111-
tape( 'if provided an `N` or `k` parameter less than or equal to `0`, the function returns `out` unchanged', opts, function test( t ) {
111+
tape( 'if provided an `N` or `k` parameter equal to `0`, the function returns `out` unchanged', opts, function test( t ) {
112112
var expected;
113113
var out;
114114
var x;

lib/node_modules/@stdlib/blas/ext/base/dcartesian-power/test/test.ndarray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ tape( 'the function returns a reference to the output array', function test( t )
9999
t.end();
100100
});
101101

102-
tape( 'if provided an `N` or `k` parameter less than or equal to `0`, the function returns `out` unchanged', function test( t ) {
102+
tape( 'if provided an `N` or `k` parameter equal to `0`, the function returns `out` unchanged', function test( t ) {
103103
var expected;
104104
var out;
105105
var x;

lib/node_modules/@stdlib/blas/ext/base/dcartesian-power/test/test.ndarray.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ tape( 'the function returns a reference to the output array', opts, function tes
108108
t.end();
109109
});
110110

111-
tape( 'if provided an `N` or `k` parameter less than or equal to `0`, the function returns `out` unchanged', opts, function test( t ) {
111+
tape( 'if provided an `N` or `k` parameter equal to `0`, the function returns `out` unchanged', opts, function test( t ) {
112112
var expected;
113113
var out;
114114
var x;

0 commit comments

Comments
 (0)