|
| 1 | +/** |
| 2 | +* @license Apache-2.0 |
| 3 | +* |
| 4 | +* Copyright (c) 2025 The Stdlib Authors. |
| 5 | +* |
| 6 | +* Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +* you may not use this file except in compliance with the License. |
| 8 | +* You may obtain a copy of the License at |
| 9 | +* |
| 10 | +* http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +* |
| 12 | +* Unless required by applicable law or agreed to in writing, software |
| 13 | +* distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +* See the License for the specific language governing permissions and |
| 16 | +* limitations under the License. |
| 17 | +*/ |
| 18 | + |
1 | 19 | 'use strict';
|
2 | 20 |
|
3 | 21 | /**
|
4 |
| -* Compute the arithmetic mean of a one dimensional ndarray using improved Kahan-Babuska compensation. |
| 22 | +* Compute the arithmetic mean of a one-dimensional ndarray using the improved Kahan–Babuška algorithm. |
5 | 23 | *
|
6 | 24 | * @module @stdlib/stats/base/ndarray/meankbn
|
7 | 25 | *
|
8 | 26 | * @example
|
9 |
| -* var ndarray = require('@stdlib/ndarray/base/ctor'); |
10 |
| -* var Float64Array = require('@stdlib/array/float64'); |
11 |
| -* var meankbn = require('@stdlib/stats/base/ndarray/meankbn'); |
| 27 | +* var ndarray = require( '@stdlib/ndarray/base/ctor' ); |
| 28 | +* var Float64Array = require( '@stdlib/array/float64' ); |
| 29 | +* var meankbn = require( '@stdlib/stats/base/ndarray/meankbn' ); |
12 | 30 | *
|
13 |
| -* var buf = new Float64Array([ 1.0, 3.0, 4.0, 2.0 ]); |
14 |
| -* var x = new ndarray('float64', buf, [buf.length], [1], 0, 'row-major'); |
| 31 | +* var buf = new Float64Array( [ 1.0, 3.0, 4.0, 2.0 ] ); |
| 32 | +* var x = new ndarray( 'float64', buf, [ buf.length ], [ 1 ], 0, 'row-major' ); |
15 | 33 | *
|
16 |
| -* var v = meankbn([ x ]); |
| 34 | +* var v = meankbn( [ x ] ); |
17 | 35 | * // returns 2.5
|
18 | 36 | */
|
19 |
| -var main = require('./lib/main.js'); |
| 37 | +var main = require( './lib' ); |
20 | 38 |
|
21 | 39 | module.exports = main;
|
0 commit comments