Skip to content

Commit 3a2a9f0

Browse files
committed
Auto-generated commit
1 parent 15a96d3 commit 3a2a9f0

13 files changed

Lines changed: 35 additions & 76 deletions

File tree

‎.github/.keepalive‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎CHANGELOG.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2026-11-11)
7+
## Unreleased (2026-11-29)
88

99
<section class="commits">
1010

1111
### Commits
1212

1313
<details>
1414

15+
- [`04ed1d5`](https://github.com/stdlib-js/stdlib/commit/04ed1d58604f590cc6e19f459a03a262d60c3ce1) - **docs:** use dedicated zero-dimensional tensor constructor in `stats/base/ndarray/sstdev` [(#16977)](https://github.com/stdlib-js/stdlib/pull/16977) _(by Suryansh Seth)_
1516
- [`8e32423`](https://github.com/stdlib-js/stdlib/commit/8e32423156316049de0700cfcb4d3da2b173f008) - **refactor:** align TypeScript declarations across stats packages [(#12512)](https://github.com/stdlib-js/stdlib/pull/12512) _(by Philipp Burckhardt)_
1617
- [`24b7879`](https://github.com/stdlib-js/stdlib/commit/24b78796fa55472fd21fc89a03c4053b88f80440) - **chore:** modernize examples and benchmarks _(by Athan Reines)_
1718

@@ -25,10 +26,11 @@
2526

2627
### Contributors
2728

28-
A total of 2 people contributed to this release. Thank you to the following contributors:
29+
A total of 3 people contributed to this release. Thank you to the following contributors:
2930

3031
- Athan Reines
3132
- Philipp Burckhardt
33+
- Suryansh Seth
3234

3335
</section>
3436

‎README.md‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,10 @@ Computes the [standard deviation][standard-deviation] of a one-dimensional singl
137137

138138
```javascript
139139
var Float32Vector = require( '@stdlib/ndarray-vector-float32' );
140-
var scalar2ndarray = require( '@stdlib/ndarray-from-scalar' );
140+
var Float32Tensor0D = require( '@stdlib/ndarray-tensor0d-float32' );
141141

142142
var x = new Float32Vector( [ 1.0, -2.0, 2.0 ] );
143-
var correction = scalar2ndarray( 1.0, {
144-
'dtype': 'float32'
145-
});
143+
var correction = new Float32Tensor0D( 1.0 );
146144

147145
var v = sstdev( [ x, correction ] );
148146
// returns ~2.0817
@@ -178,7 +176,7 @@ The function has the following parameters:
178176

179177
```javascript
180178
var discreteUniform = require( '@stdlib/random-discrete-uniform' );
181-
var scalar2ndarray = require( '@stdlib/ndarray-from-scalar' );
179+
var Float32Tensor0D = require( '@stdlib/ndarray-tensor0d-float32' );
182180
var ndarray2array = require( '@stdlib/ndarray-to-array' );
183181
var sstdev = require( '@stdlib/stats-base-ndarray-sstdev' );
184182

@@ -189,7 +187,7 @@ var opts = {
189187
var x = discreteUniform( [ 10 ], -50, 50, opts );
190188
console.log( ndarray2array( x ) );
191189

192-
var correction = scalar2ndarray( 1.0, opts );
190+
var correction = new Float32Tensor0D( 1.0 );
193191
var v = sstdev( [ x, correction ] );
194192
console.log( v );
195193
```

‎benchmark/benchmark.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var bench = require( '@stdlib/bench-harness' );
2424
var uniform = require( '@stdlib/random-uniform' );
2525
var isnanf = require( '@stdlib/math-base-assert-is-nanf' );
2626
var pow = require( '@stdlib/math-base-special-pow' );
27-
var scalar2ndarray = require( '@stdlib/ndarray-from-scalar' );
27+
var Float32Tensor0D = require( '@stdlib/ndarray-tensor0d-float32' );
2828
var format = require( '@stdlib/string-format' );
2929
var pkg = require( './../package.json' ).name;
3030
var sstdev = require( './../lib' );
@@ -51,7 +51,7 @@ function createBenchmark( len ) {
5151
var x;
5252

5353
x = uniform( [ len ], -10.0, 10.0, options );
54-
correction = scalar2ndarray( 1.0, options );
54+
correction = new Float32Tensor0D( 1.0 );
5555

5656
return benchmark;
5757

‎dist/index.js.map‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/repl.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
Examples
3737
--------
3838
> var x = new {{alias:@stdlib/ndarray/vector/float32}}( [ 1.0, -2.0, 2.0 ] );
39-
> var correction = {{alias:@stdlib/ndarray/from-scalar}}( 1.0, { 'dtype': 'float32' } );
39+
> var correction = new {{alias:@stdlib/ndarray/tensor0d/float32}}( 1.0 );
4040
> {{alias}}( [ x, correction ] )
4141
~2.0817
4242

‎docs/types/index.d.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ import { float32ndarray, typedndarray } from '@stdlib/types/ndarray';
3737
*
3838
* @example
3939
* var Float32Vector = require( '@stdlib/ndarray-vector-float32' );
40-
* var scalar2ndarray = require( '@stdlib/ndarray-from-scalar' );
40+
* var Float32Tensor0D = require( '@stdlib/ndarray-tensor0d-float32' );
4141
*
4242
* var x = new Float32Vector( [ 1.0, -2.0, 2.0 ] );
43-
* var correction = scalar2ndarray( 1.0, {
44-
* 'dtype': 'float32'
45-
* });
43+
* var correction = new Float32Tensor0D( 1.0 );
4644
*
4745
* var v = sstdev( [ x, correction ] );
4846
* // returns ~2.0817

‎docs/types/test.ts‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/* eslint-disable space-in-parens */
2020

2121
import zeros = require( '@stdlib/ndarray-zeros' );
22-
import scalar2ndarray = require( '@stdlib/ndarray-from-scalar' );
22+
import Float32Tensor0D = require( '@stdlib/ndarray-tensor0d-float32' );
2323
import sstdev = require( './index' );
2424

2525

@@ -30,9 +30,7 @@ import sstdev = require( './index' );
3030
const x = zeros( [ 10 ], {
3131
'dtype': 'float32'
3232
});
33-
const correction = scalar2ndarray( 1.0, {
34-
'dtype': 'float32'
35-
});
33+
const correction = new Float32Tensor0D( 1.0 );
3634

3735
sstdev( [ x, correction ] ); // $ExpectType number
3836
}
@@ -55,9 +53,7 @@ import sstdev = require( './index' );
5553
const x = zeros( [ 10 ], {
5654
'dtype': 'float32'
5755
});
58-
const correction = scalar2ndarray( 1.0, {
59-
'dtype': 'float32'
60-
});
56+
const correction = new Float32Tensor0D( 1.0 );
6157

6258
sstdev(); // $ExpectError
6359
sstdev( [ x, correction ], 10 ); // $ExpectError

‎examples/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
'use strict';
2020

2121
var discreteUniform = require( '@stdlib/random-discrete-uniform' );
22-
var scalar2ndarray = require( '@stdlib/ndarray-from-scalar' );
22+
var Float32Tensor0D = require( '@stdlib/ndarray-tensor0d-float32' );
2323
var ndarray2array = require( '@stdlib/ndarray-to-array' );
2424
var sstdev = require( './../lib' );
2525

@@ -30,6 +30,6 @@ var opts = {
3030
var x = discreteUniform( [ 10 ], -50, 50, opts );
3131
console.log( ndarray2array( x ) );
3232

33-
var correction = scalar2ndarray( 1.0, opts );
33+
var correction = new Float32Tensor0D( 1.0 );
3434
var v = sstdev( [ x, correction ] );
3535
console.log( v );

‎lib/index.js‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@
2525
*
2626
* @example
2727
* var Float32Vector = require( '@stdlib/ndarray-vector-float32' );
28-
* var scalar2ndarray = require( '@stdlib/ndarray-from-scalar' );
28+
* var Float32Tensor0D = require( '@stdlib/ndarray-tensor0d-float32' );
2929
* var sstdev = require( '@stdlib/stats-base-ndarray-sstdev' );
3030
*
3131
* var x = new Float32Vector( [ 1.0, -2.0, 2.0 ] );
32-
* var correction = scalar2ndarray( 1.0, {
33-
* 'dtype': 'float32'
34-
* });
32+
* var correction = new Float32Tensor0D( 1.0 );
3533
*
3634
* var v = sstdev( [ x, correction ] );
3735
* // returns ~2.0817

0 commit comments

Comments
 (0)