Skip to content

Commit 8b04eb7

Browse files
committed
Fix: Replace all csum references with csumkbn and update examples
1 parent 8515e9a commit 8b04eb7

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

lib/node_modules/@stdlib/blas/ext/base/ndarray/csumkbn/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ Computes the sum of all elements in a one-dimensional single-precision complex f
4444
var Complex64Array = require( '@stdlib/array/complex64' );
4545
var ndarray = require( '@stdlib/ndarray/base/ctor' );
4646

47-
var xbuf = new Complex64Array( [ 1.0, 3.0, 4.0, 2.0 ] );
47+
var xbuf = new Complex64Array( [ 1.0, -2.0, 2.0, 3.0 ] );
4848
var x = new ndarray( 'complex64', xbuf, [ 2 ], [ 1 ], 0, 'row-major' );
4949

5050
var v = csumkbn( [ x ] );
51-
// returns <Complex64>[ 5.0, 5.0 ]
51+
// returns <Complex64>[ 3.0, 1.0 ]
5252
```
5353

5454
The function has the following parameters:

lib/node_modules/@stdlib/blas/ext/base/ndarray/csumkbn/docs/repl.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
{{alias}}( arrays )
3-
Computes the sum of all elements in one-dimensional single-precision
3+
Computes the sum of all elements in a one-dimensional single-precision
44
complex floating-point ndarray using an improved Kahan–Babuška algorithm.
55

66
If provided an empty ndarray, the function returns `0.0`.

lib/node_modules/@stdlib/blas/ext/base/ndarray/csumkbn/test/test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,23 @@ tape( 'the function computes the sum of all elements in a one-dimensional ndarra
6363
var v;
6464

6565
x = new Complex64Array( [ 1.0, -2.0, -4.0, 5.0, 0.0, 3.0 ] );
66-
v = csum( [ vector( x, 3, 1, 0 ) ] );
66+
v = csumkbn( [ vector( x, 3, 1, 0 ) ] );
6767
t.strictEqual( isSameComplex64( v, new Complex64( -3.0, 6.0 ) ), true, 'returns expected value' );
6868

6969
x = new Complex64Array( [ -4.0, -5.0, -4.0, -5.0 ] );
70-
v = csum( [ vector( x, 2, 1, 0 ) ] );
70+
v = csumkbn( [ vector( x, 2, 1, 0 ) ] );
7171
t.strictEqual( isSameComplex64( v, new Complex64( -8.0, -10.0 ) ), true, 'returns expected value' );
7272

7373
x = new Complex64Array( [ -0.0, 0.0, -0.0, -0.0 ] );
74-
v = csum( [ vector( x, 2, 1, 0 ) ] );
74+
v = csumkbn( [ vector( x, 2, 1, 0 ) ] );
7575
t.strictEqual( isSameComplex64( v, new Complex64( -0.0, 0.0 ) ), true, 'returns expected value' );
7676

7777
x = new Complex64Array( [ NaN, NaN ] );
78-
v = csum( [ vector( x, 1, 1, 0 ) ] );
78+
v = csumkbn( [ vector( x, 1, 1, 0 ) ] );
7979
t.strictEqual( isSameComplex64( v, new Complex64( NaN, NaN ) ), true, 'returns expected value' );
8080

8181
x = new Complex64Array( [ NaN, NaN, NaN, NaN ] );
82-
v = csum( [ vector( x, 2, 1, 0 ) ] );
82+
v = csumkbn( [ vector( x, 2, 1, 0 ) ] );
8383
t.strictEqual( isSameComplex64( v, new Complex64( NaN, NaN ) ), true, 'returns expected value' );
8484

8585
t.end();
@@ -91,7 +91,7 @@ tape( 'if provided an empty ndarray, the function returns `0.0`', function test(
9191

9292
x = new Complex64Array( [] );
9393

94-
v = csum( [ vector( x, 0, 1, 0 ) ] );
94+
v = csumkbn( [ vector( x, 0, 1, 0 ) ] );
9595
t.strictEqual( isSameComplex64( v, new Complex64( 0.0, 0.0 ) ), true, 'returns expected value' );
9696

9797
t.end();
@@ -103,7 +103,7 @@ tape( 'if provided a ndarray containing a single element, the function returns t
103103

104104
x = new Complex64Array( [ 1.0, 2.0 ] );
105105

106-
v = csum( [ vector( x, 1, 1, 0 ) ] );
106+
v = csumkbn( [ vector( x, 1, 1, 0 ) ] );
107107
t.strictEqual( isSameComplex64( v, new Complex64( 1.0, 2.0 ) ), true, 'returns expected value' );
108108

109109
t.end();
@@ -132,7 +132,7 @@ tape( 'the function supports one-dimensional ndarrays having non-unit strides',
132132
2.0
133133
]);
134134

135-
v = csum( [ vector( x, 4, 2, 0 ) ] );
135+
v = csumkbn( [ vector( x, 4, 2, 0 ) ] );
136136

137137
t.strictEqual( isSameComplex64( v, new Complex64( 5.0, 5.0 ) ), true, 'returns expected value' );
138138
t.end();
@@ -161,7 +161,7 @@ tape( 'the function supports one-dimensional ndarrays having negative strides',
161161
2.0
162162
]);
163163

164-
v = csum( [ vector( x, 4, -2, 6 ) ] );
164+
v = csumkbn( [ vector( x, 4, -2, 6 ) ] );
165165

166166
t.strictEqual( isSameComplex64( v, new Complex64( 5.0, 5.0 ) ), true, 'returns expected value' );
167167
t.end();
@@ -192,7 +192,7 @@ tape( 'the function supports one-dimensional ndarrays having non-zero offsets',
192192
2.0
193193
]);
194194

195-
v = csum( [ vector( x, 4, 2, 1 ) ] );
195+
v = csumkbn( [ vector( x, 4, 2, 1 ) ] );
196196
t.strictEqual( isSameComplex64( v, new Complex64( 5.0, 5.0 ) ), true, 'returns expected value' );
197197

198198
t.end();

0 commit comments

Comments
 (0)