Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into de…
Browse files Browse the repository at this point in the history
…velop
  • Loading branch information
kgryte committed Sep 20, 2024
2 parents a215aba + e454c91 commit 4e74e24
Show file tree
Hide file tree
Showing 51 changed files with 90 additions and 106 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/dapxsum",
"version": "0.0.0",
"description": "Add a constant to each double-precision floating-point strided array element and computes the sum.",
"description": "Add a constant to each double-precision floating-point strided array element and compute the sum.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/dapxsumkbn",
"version": "0.0.0",
"description": "Add a constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan–Babuška algorithm.",
"description": "Add a constant to each double-precision floating-point strided array element and compute the sum using an improved Kahan–Babuška algorithm.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/dapxsumkbn2",
"version": "0.0.0",
"description": "Add a constant to each double-precision floating-point strided array element and computes the sum using a second-order iterative Kahan–Babuška algorithm.",
"description": "Add a constant to each double-precision floating-point strided array element and compute the sum using a second-order iterative Kahan–Babuška algorithm.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/dapxsumors",
"version": "0.0.0",
"description": "Add a constant to each double-precision floating-point strided array element and computes the sum using ordinary recursive summation.",
"description": "Add a constant to each double-precision floating-point strided array element and compute the sum using ordinary recursive summation.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/dapxsumpw",
"version": "0.0.0",
"description": "Add a constant to each double-precision floating-point strided array element and computes the sum using pairwise summation.",
"description": "Add a constant to each double-precision floating-point strided array element and compute the sum using pairwise summation.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function createBenchmark( len ) {
return benchmark;

function rand() {
if ( bernoulli( 0.5 ) < 0.2 ) {
if ( bernoulli( 0.2 ) ) {
return NaN;
}
return uniform( -10.0, 10.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function createBenchmark( len ) {
return benchmark;

function rand() {
if ( bernoulli( 0.5 ) < 0.2 ) {
if ( bernoulli( 0.2 ) ) {
return NaN;
}
return uniform( -10.0, 10.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function createBenchmark( len ) {
return benchmark;

function rand() {
if ( bernoulli( 0.5 ) < 0.2 ) {
if ( bernoulli( 0.2 ) ) {
return NaN;
}
return uniform( -10.0, 10.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function createBenchmark( len ) {
return benchmark;

function rand() {
if ( bernoulli( 0.5 ) < 0.2 ) {
if ( bernoulli( 0.2 ) ) {
return NaN;
}
return uniform( -10.0, 10.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var filledarrayBy = require( '@stdlib/array/filled-by' );
var dnanasumors = require( './../lib' );

function rand() {
if ( bernoulli( 0.5 ) < 0.2 ) {
if ( bernoulli( 0.2 ) ) {
return NaN;
}
return discreteUniform( 0, 100 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "stdlib/napi/argv_int64.h"
#include "stdlib/napi/argv_strided_float64array.h"
#include <node_api.h>
#include <assert.h>

/**
* Receives JavaScript callback invocation data.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/dsapxsum",
"version": "0.0.0",
"description": "Add a constant to each single-precision floating-point strided array element and computes the sum using extended accumulation and returning an extended precision result.",
"description": "Add a constant to each single-precision floating-point strided array element and compute the sum using extended accumulation and returning an extended precision result.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/dsapxsumpw",
"version": "0.0.0",
"description": "Add a constant to each single-precision floating-point strided array element and computes the sum using pairwise summation with extended accumulation and returning an extended precision result.",
"description": "Add a constant to each single-precision floating-point strided array element and compute the sum using pairwise summation with extended accumulation and returning an extended precision result.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,14 @@ var Float32Array = require( '@stdlib/array/float32' );
var Float64Array = require( '@stdlib/array/float64' );
var dsnannsumors = require( '@stdlib/blas/ext/base/dsnannsumors' );

var x;

function rand() {
if ( bernoulli( 0.5 ) < 0.2 ) {
return NaN;
}
return discreteUniform( 0, 100 );
}

x = filledarrayBy( 10, 'float32', rand );
var x = filledarrayBy( 10, 'float32', rand );
console.log( x );

var out = new Float64Array( 2 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function createBenchmark( len ) {
return benchmark;

function rand() {
if ( bernoulli( 0.5 ) < 0.2 ) {
if ( bernoulli( 0.2 ) ) {
return NaN;
}
return uniform( -10.0, 10.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function createBenchmark( len ) {
return benchmark;

function rand() {
if ( bernoulli( 0.5 ) < 0.2 ) {
if ( bernoulli( 0.2 ) ) {
return NaN;
}
return uniform( -10.0, 10.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function createBenchmark( len ) {
return benchmark;

function rand() {
if ( bernoulli( 0.5 ) < 0.2 ) {
if ( bernoulli( 0.2 ) ) {
return NaN;
}
return uniform( -10.0, 10.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function createBenchmark( len ) {
return benchmark;

function rand() {
if ( bernoulli( 0.5 ) < 0.2 ) {
if ( bernoulli( 0.2 ) ) {
return NaN;
}
return uniform( -10.0, 10.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,16 @@ var filledarrayBy = require( '@stdlib/array/filled-by' );
var Float64Array = require( '@stdlib/array/float64' );
var dsnannsumors = require( './../lib' );

var out;
var x;

function rand() {
if ( bernoulli( 0.5 ) < 0.2 ) {
if ( bernoulli( 0.2 ) ) {
return NaN;
}
return discreteUniform( 0, 100 );
}

x = filledarrayBy( 10, 'float32', rand );
var x = filledarrayBy( 10, 'float32', rand );
console.log( x );

out = new Float64Array( 2 );
var out = new Float64Array( 2 );
dsnannsumors( x.length, x, 1, out, 1 );
console.log( out );
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "stdlib/napi/argv_strided_float32array.h"
#include "stdlib/napi/argv_strided_float64array.h"
#include <node_api.h>
#include <assert.h>

/**
* Receives JavaScript callback invocation data.
Expand Down Expand Up @@ -56,4 +55,4 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
return NULL;
}

STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/gapxsum",
"version": "0.0.0",
"description": "Add a constant to each strided array element and computes the sum.",
"description": "Add a constant to each strided array element and compute the sum.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/gapxsumkbn",
"version": "0.0.0",
"description": "Add a constant to each strided array element and computes the sum using an improved Kahan–Babuška algorithm.",
"description": "Add a constant to each strided array element and compute the sum using an improved Kahan–Babuška algorithm.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/gapxsumkbn2",
"version": "0.0.0",
"description": "Add a constant to each strided array element and computes the sum using a second-order iterative Kahan–Babuška algorithm.",
"description": "Add a constant to each strided array element and compute the sum using a second-order iterative Kahan–Babuška algorithm.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/gapxsumors",
"version": "0.0.0",
"description": "Add a constant to each strided array element and computes the sum using ordinary recursive summation.",
"description": "Add a constant to each strided array element and compute the sum using ordinary recursive summation.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/gapxsumpw",
"version": "0.0.0",
"description": "Add a constant to each strided array element and computes the sum using pairwise summation.",
"description": "Add a constant to each strided array element and compute the sum using pairwise summation.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/sapxsum",
"version": "0.0.0",
"description": "Add a constant to each single-precision floating-point strided array element and computes the sum.",
"description": "Add a constant to each single-precision floating-point strided array element and compute the sum.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/sapxsumkbn",
"version": "0.0.0",
"description": "Add a constant to each single-precision floating-point strided array element and computes the sum using an improved Kahan–Babuška algorithm.",
"description": "Add a constant to each single-precision floating-point strided array element and compute the sum using an improved Kahan–Babuška algorithm.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/base/sapxsumkbn2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ var v = sapxsumkbn2.ndarray( 4, 5.0, x, 2, 1 );

```javascript
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
var filledarrayBy = require( '@stdlib/array/filled-by');
var filledarrayBy = require( '@stdlib/array/filled-by' );
var sapxsumkbn2 = require( '@stdlib/blas/ext/base/sapxsumkbn2' );

var x = filledarrayBy( 10, 'float32', discreteUniform( 0, 100 ));
var x = filledarrayBy( 10, 'float32', discreteUniform( 0, 100 ) );
console.log( x );

var v = sapxsumkbn2( x.length, 5.0, x, 1 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@stdlib/napi/export",
"@stdlib/napi/argv",
"@stdlib/napi/argv-int64",
"@stdlib/napi/argv-double",
"@stdlib/napi/argv-float",
"@stdlib/napi/argv-strided-float32array"
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/sapxsumkbn2",
"version": "0.0.0",
"description": "Add a constant to each single-precision floating-point strided array element and computes the sum using a second-order iterative Kahan–Babuška algorithm.",
"description": "Add a constant to each single-precision floating-point strided array element and compute the sum using a second-order iterative Kahan–Babuška algorithm.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 1)
STDLIB_NAPI_ARGV_FLOAT( env, alpha, argv, 1)
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 2 );

napi_value v;
napi_status status = napi_create_double( env, stdlib_strided_sapxsumkbn2( N, alpha, X, stride ), &v );
napi_status status = napi_create_double( env, (double)stdlib_strided_sapxsumkbn2( N, alpha, X, stride ), &v );
assert( status == napi_ok );

return v;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ var filledarrayBy = require( '@stdlib/array/filled-by' );
var Float32Array = require( '@stdlib/array/float32' );
var sapxsumors = require( '@stdlib/blas/ext/base/sapxsumors' );

var x = filledarrayBy( 10, 'float32', discreteUniform( 0, 100 ));
var x = filledarrayBy( 10, 'float32', discreteUniform( 0, 100 ) );
console.log( x );

var v = sapxsumors( x.length, 5.0, x, 1 );
Expand Down
18 changes: 3 additions & 15 deletions lib/node_modules/@stdlib/blas/ext/base/sapxsumors/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@stdlib/napi/export",
"@stdlib/napi/argv",
"@stdlib/napi/argv-int64",
"@stdlib/napi/argv-double",
"@stdlib/napi/argv-float",
"@stdlib/napi/argv-strided-float32array"
]
},
Expand All @@ -57,13 +57,7 @@
"-lm"
],
"libpath": [],
"dependencies": [
"@stdlib/napi/export",
"@stdlib/napi/argv",
"@stdlib/napi/argv-int64",
"@stdlib/napi/argv-double",
"@stdlib/napi/argv-strided-float32array"
]
"dependencies": []
},
{
"task": "examples",
Expand All @@ -77,13 +71,7 @@
"-lm"
],
"libpath": [],
"dependencies": [
"@stdlib/napi/export",
"@stdlib/napi/argv",
"@stdlib/napi/argv-int64",
"@stdlib/napi/argv-double",
"@stdlib/napi/argv-strided-float32array"
]
"dependencies": []
}
]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/sapxsumors",
"version": "0.0.0",
"description": "Add a constant to each single-precision floating-point strided array element and computes the sum using ordinary recursive summation.",
"description": "Add a constant to each single-precision floating-point strided array element and compute the sum using ordinary recursive summation.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/base/sapxsumors/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 1 );
STDLIB_NAPI_ARGV_FLOAT( env, alpha, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 2 );

napi_value v;
napi_status status = napi_create_double( env, stdlib_strided_sapxsumors( N, alpha, X, stride ), &v );
napi_status status = napi_create_double( env, (double)stdlib_strided_sapxsumors( N, alpha, X, stride ), &v );
assert( status == napi_ok );

return v;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/ext/base/sapxsumpw",
"version": "0.0.0",
"description": "Add a constant to each single-precision floating-point strided array element and computes the sum using pairwise summation.",
"description": "Add a constant to each single-precision floating-point strided array element and compute the sum using pairwise summation.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Loading

1 comment on commit 4e74e24

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report

Package Statements Branches Functions Lines
assert/is-ndarray-like-with-data-type $\color{green}99/99$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}99/99$
$\color{green}+100.00\%$
assert $\color{green}2733/2733$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}2733/2733$
$\color{green}+100.00\%$
namespace/alias2pkg $\color{green}95/95$
$\color{green}+100.00\%$
$\color{green}7/7$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}95/95$
$\color{green}+100.00\%$
namespace/alias2related $\color{green}95/95$
$\color{green}+100.00\%$
$\color{green}7/7$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}95/95$
$\color{green}+100.00\%$
namespace/alias2standalone $\color{green}95/95$
$\color{green}+100.00\%$
$\color{green}7/7$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}95/95$
$\color{green}+100.00\%$
namespace/aliases $\color{green}144/144$
$\color{green}+100.00\%$
$\color{green}14/14$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}144/144$
$\color{green}+100.00\%$
namespace $\color{green}95/95$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}95/95$
$\color{green}+100.00\%$
namespace/pkg2alias $\color{green}100/100$
$\color{green}+100.00\%$
$\color{green}10/10$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}100/100$
$\color{green}+100.00\%$
namespace/pkg2related $\color{green}100/100$
$\color{green}+100.00\%$
$\color{green}10/10$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}100/100$
$\color{green}+100.00\%$
namespace/pkg2standalone $\color{green}95/95$
$\color{green}+100.00\%$
$\color{green}7/7$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}95/95$
$\color{green}+100.00\%$
namespace/standalone2pkg $\color{green}95/95$
$\color{green}+100.00\%$
$\color{green}7/7$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}95/95$
$\color{green}+100.00\%$
repl/code-blocks $\color{green}95/95$
$\color{green}+100.00\%$
$\color{green}7/7$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}95/95$
$\color{green}+100.00\%$
repl $\color{red}10413/12996$
$\color{green}+80.12\%$
$\color{red}635/863$
$\color{green}+73.58\%$
$\color{red}146/232$
$\color{green}+62.93\%$
$\color{red}10413/12996$
$\color{green}+80.12\%$
repl/help $\color{green}95/95$
$\color{green}+100.00\%$
$\color{green}7/7$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}95/95$
$\color{green}+100.00\%$
repl/info $\color{green}95/95$
$\color{green}+100.00\%$
$\color{green}7/7$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}95/95$
$\color{green}+100.00\%$
repl/signature $\color{green}99/99$
$\color{green}+100.00\%$
$\color{green}10/10$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}99/99$
$\color{green}+100.00\%$
repl/typed-signature $\color{green}99/99$
$\color{green}+100.00\%$
$\color{green}10/10$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}99/99$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.