Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
assert( status == napi_ok );
return NULL;
}
// Create a const-qualified view of the argument pointer list:
const struct ndarray *arr[ 1 ] = {
arrays[ 0 ]
};
// Perform computation:
STDLIB_NAPI_CREATE_DOUBLE( env, (double)stdlib_blas_ext_snansumkbn( arrays ), v );
STDLIB_NAPI_CREATE_DOUBLE( env, (double)stdlib_blas_ext_snansumkbn( arr ), v );

// Free allocated memory:
stdlib_ndarray_free( arrays[ 0 ] );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
assert( status == napi_ok );
return NULL;
}
// Create a const-qualified view of the argument pointer list:
const struct ndarray *arr[ 1 ] = {
arrays[ 0 ]
};
// Perform computation:
STDLIB_NAPI_CREATE_DOUBLE( env, (double)stdlib_stats_smean( arrays ), v );
STDLIB_NAPI_CREATE_DOUBLE( env, (double)stdlib_stats_smean( arr ), v );

// Free allocated memory:
stdlib_ndarray_free( arrays[ 0 ] );
Expand Down