Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jan 17, 2025
1 parent e1edfbf commit 1e7558a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 42 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ indent_style = tab
[*.{f,f.txt}]
indent_style = space
indent_size = 2
insert_final_newline = false

# Set properties for shell files:
[*.{sh,sh.txt}]
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<section class="release" id="unreleased">

## Unreleased (2025-01-14)
## Unreleased (2025-01-17)

<section class="packages">

Expand Down Expand Up @@ -2854,6 +2854,9 @@ A total of 7 people contributed to this release. Thank you to the following cont

<details>

- [`5fd0a59`](https://github.com/stdlib-js/stdlib/commit/5fd0a59f372e982a78028b9f249e5ba0921a231f) - **docs:** update examples _(by Athan Reines)_
- [`d0d1438`](https://github.com/stdlib-js/stdlib/commit/d0d143871a928a6bd11157c58abb5b17a0f405d4) - **docs:** add missing include _(by Athan Reines)_
- [`c794cdb`](https://github.com/stdlib-js/stdlib/commit/c794cdbb6d6c94f04e713589e5c233807bfd3012) - **docs:** update examples _(by Athan Reines)_
- [`8a5caba`](https://github.com/stdlib-js/stdlib/commit/8a5caba090beccf502d1d66e31e5c7986dc52e3a) - **docs:** update related packages sections [(#4739)](https://github.com/stdlib-js/stdlib/pull/4739) _(by stdlib-bot)_
- [`f0db7f5`](https://github.com/stdlib-js/stdlib/commit/f0db7f5956b712e544fb2cd7c1432feaff516008) - **docs:** update related packages sections [(#4728)](https://github.com/stdlib-js/stdlib/pull/4728) _(by stdlib-bot)_
- [`9f23be0`](https://github.com/stdlib-js/stdlib/commit/9f23be0621e3c986516d30ee60b19492f0de7f12) - **docs:** update examples _(by Athan Reines)_
Expand Down
16 changes: 6 additions & 10 deletions base/assert/is-probability/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,11 @@ bool = isProbability( NaN );
var uniform = require( '@stdlib/random/array/uniform' );
var isProbability = require( '@stdlib/math/base/assert/is-probability' );

var bool;
var len;
var x;
var i;

len = 100;
x = uniform( len, -1.0, 1.0 );
var x = uniform( 100, -1.0, 1.0 );

for ( i = 0; i < 100; i++ ) {
bool = isProbability( x[ i ] );
console.log( '%d is %s', x[ i ], ( bool ) ? 'a probability' : 'not a probability' );
var i;
for ( i = 0; i < x.length; i++ ) {
console.log( '%d is %s', x[ i ], ( isProbability( x[ i ] ) ) ? 'a probability' : 'not a probability' );
}
```

Expand Down Expand Up @@ -108,6 +102,8 @@ for ( i = 0; i < 100; i++ ) {
Tests if a double-precision floating-point number is a probability.

```c
#include <stdbool.h>

bool out = stdlib_base_is_probability( 0.5 );
// returns true

Expand Down
14 changes: 4 additions & 10 deletions base/assert/is-probability/examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,9 @@
var uniform = require( '@stdlib/random/array/uniform' );
var isProbability = require( './../lib' );

var bool;
var len;
var x;
var i;

len = 100;
x = uniform( len, -1.0, 1.0 );
var x = uniform( 100, -1.0, 1.0 );

for ( i = 0; i < 100; i++ ) {
bool = isProbability( x[ i ] );
console.log( '%d is %s', x[ i ], ( bool ) ? 'a probability' : 'not a probability' );
var i;
for ( i = 0; i < x.length; i++ ) {
console.log( '%d is %s', x[ i ], ( isProbability( x[ i ] ) ) ? 'a probability' : 'not a probability' );
}
16 changes: 6 additions & 10 deletions base/assert/is-probabilityf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,13 @@ bool = isProbabilityf( NaN );
var uniform = require( '@stdlib/random/array/uniform' );
var isProbabilityf = require( '@stdlib/math/base/assert/is-probabilityf' );

var bool;
var opts;
var x;
var i;

opts = {
var x = uniform( 100, -1.0, 1.0, {
'dtype': 'float32'
};
x = uniform( 100, -1.0, 1.0, opts );
});

var i;
for ( i = 0; i < 100; i++ ) {
bool = isProbabilityf( x[ i ] );
console.log( '%d is %s', x[ i ], ( bool ) ? 'a probability' : 'not a probability' );
console.log( '%d is %s', x[ i ], ( isProbabilityf( x[ i ] ) ) ? 'a probability' : 'not a probability' );
}
```

Expand Down Expand Up @@ -110,6 +104,8 @@ for ( i = 0; i < 100; i++ ) {
Tests if a single-precision floating-point number is a probability.

```c
#include <stdbool.h>

bool out = stdlib_base_is_probabilityf( 0.5f );
// returns true

Expand Down
14 changes: 4 additions & 10 deletions base/assert/is-probabilityf/examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,11 @@
var uniform = require( '@stdlib/random/array/uniform' );
var isProbabilityf = require( './../lib' );

var bool;
var opts;
var x;
var i;

opts = {
var x = uniform( 100, -1.0, 1.0, {
'dtype': 'float32'
};
x = uniform( 100, -1.0, 1.0, opts );
});

var i;
for ( i = 0; i < 100; i++ ) {
bool = isProbabilityf( x[ i ] );
console.log( '%d is %s', x[ i ], ( bool ) ? 'a probability' : 'not a probability' );
console.log( '%d is %s', x[ i ], ( isProbabilityf( x[ i ] ) ) ? 'a probability' : 'not a probability' );
}

0 comments on commit 1e7558a

Please sign in to comment.