Skip to content

Commit 02e81f2

Browse files
committed
fix: multiple errors
1 parent dfd32fd commit 02e81f2

File tree

9 files changed

+536
-223
lines changed

9 files changed

+536
-223
lines changed

lib/node_modules/@stdlib/blas/base/drotmg/benchmark/benchmark.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var bench = require( '@stdlib/bench' );
2424
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
25-
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
25+
var isnan = require( '@stdlib/math/base/assert/is-nanf' );
2626
var Float64Array = require( '@stdlib/array/float64' );
2727
var pkg = require( './../package.json' ).name;
2828
var drotmg = require( './../lib' );
@@ -53,12 +53,12 @@ bench( pkg, function benchmark( b ) {
5353
b.tic();
5454
for ( i = 0; i < b.iterations; i++ ) {
5555
param = drotmg( d1[ i%d1.length ], d2[ i%d2.length ], x1[ i%x1.length ], y1[ i%y1.length ] );
56-
if ( isnanf( param[ i%5 ] ) ) {
56+
if ( isnan( param[ i%5 ] ) ) {
5757
b.fail( 'should not return NaN' );
5858
}
5959
}
6060
b.toc();
61-
if ( isnanf( param[ i%5 ] ) ) {
61+
if ( isnan( param[ i%5 ] ) ) {
6262
b.fail( 'should not return NaN' );
6363
}
6464
b.pass( 'benchmark finished' );
@@ -69,15 +69,15 @@ bench( pkg+':assign', function benchmark( b ) {
6969
var param;
7070
var d1;
7171
var d2;
72-
var x1;
73-
var y1;
72+
var x1;
73+
var y1;
7474
var z;
7575
var i;
7676

7777
d1 = discreteUniform( 100, -5, 5, OPTS );
7878
d2 = discreteUniform( 100, -5, 5, OPTS );
79-
x1 = discreteUniform( 100, -5, 5, OPTS );
80-
y1 = discreteUniform( 100, -5, 5, OPTS );
79+
x1 = discreteUniform( 100, -5, 5, OPTS );
80+
y1 = discreteUniform( 100, -5, 5, OPTS );
8181
param = new Float64Array( 5 );
8282

8383
b.tic();
@@ -88,7 +88,7 @@ bench( pkg+':assign', function benchmark( b ) {
8888
}
8989
}
9090
b.toc();
91-
if ( isnanf( z[ i%5 ] ) ) {
91+
if ( isnan( z[ i%5 ] ) ) {
9292
b.fail( 'should return the output array' );
9393
}
9494
b.pass( 'benchmark finished' );

lib/node_modules/@stdlib/blas/base/drotmg/docs/repl.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
{{alias}}( d1, d2, x1, y1 )
3-
Constructs the parameters for a modified Givens plane rotation.
3+
Constructs the parameters for a modified Givens plane rotation from four
4+
double-precision floating-point numbers.
45

56
Parameters
67
----------
@@ -23,12 +24,14 @@
2324

2425
Examples
2526
--------
26-
> var out = {{alias}}( 1.0, 1.0, 1.0, 0.0 )
27-
<Float64Array>[ -2.0, 0.0, 0.0, 1.0, 0.0 ]
27+
> var out = {{alias}}( 3.0, 4.0, 1.5, 2.5 )
28+
<Float64Array>[ 1.0, 0.45, 0.0, 0.0, 0.6 ]
2829

2930

30-
{{alias}}.assign( d1, d2, x1. y1, out, stride, offset )
31-
Constructs the parameters for a modified Givens plane rotation.
31+
{{alias}}.assign( d1, d2, x1, y1, out, stride, offset )
32+
Constructs the parameters for a modified Givens plane rotation from four
33+
double-precision floating-point numbers and assigns the results to an
34+
output array.
3235

3336
Parameters
3437
----------
@@ -61,8 +64,8 @@
6164
Examples
6265
--------
6366
> var out = new {{alias:@stdlib/array/float64}}( 5 );
64-
> var y = {{alias}}.assign( 1.0, 1.0, 1.0, 0.0, out, 1, 0 )
65-
<Float64Array>[ -2.0, 0.0, 0.0, 1.0, 0.0 ]
67+
> var y = {{alias}}.assign( 3.0, 4.0, 1.5, 2.5, out, 1, 0 )
68+
<Float64Array>[ 1.0, 0.45, 0.0, 0.0, 0.6 ]
6669
> var bool = ( y === out )
6770
true
6871

lib/node_modules/@stdlib/blas/base/drotmg/docs/types/index.d.ts

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* Inteface describing `drotmg`.
2323
*/
2424
interface Routine {
25-
/**
25+
/**
2626
* Constructs the parameters for a modified Givens plane rotation.
2727
*
2828
* @param d1 - scaling factor for the first vector component
@@ -32,14 +32,16 @@ interface Routine {
3232
* @returns - output array containing the rotation parameters
3333
*
3434
* @example
35-
* var Float64Array = require( '@stdlib/array/float64' );
35+
* var out = drotmg( 3.0, 4.0, 1.5, 2.5 );
36+
* // returns <Float64Array>[ 1.0, 0.45, 0.0, 0.0, 0.6 ]
3637
*
37-
* var out = drotmg( 1.0, 1.0, 1.0, 0.0 );
38-
* // returns <Float64Array>[ 0.0, 1.0, 0.0, 1.0, 0.0 ]
38+
* @example
39+
* var out = drotmg( 3.0, 5.0, 1.0, 2.0 );
40+
* // returns <Float64Array>[ 1.0, 0.3, 0.0, 0.0, 0.5 ]
3941
*/
40-
( d1: number, d2: number, x1: number, y1: number ): Float64Array;
42+
( d1: number, d2: number, x1: number, y1: number ): Float64Array;
4143

42-
/**
44+
/**
4345
* Constructs the parameters for a modified Givens plane rotation.
4446
*
4547
* @param d1 - scaling factor for the first vector component
@@ -54,13 +56,15 @@ interface Routine {
5456
* @example
5557
* var Float64Array = require( '@stdlib/array/float64' );
5658
*
57-
* var out = drotmg( 1.0, 1.0, 1.0, 0.0 );
58-
* // returns <Float64Array>[ 0.0, 1.0, 0.0, 1.0, 0.0 ]
59+
* var out = new Float64Array( 5 );
60+
*
61+
* var y = drotmg.assign( 3.0, 4.0, 1.5, 2.5, out, 1, 0 );
62+
* // returns <Float64Array>[ 1.0, 0.45, 0.0, 0.0, 0.6 ]
5963
*
6064
* var bool = (y === out);
6165
* // returns true
6266
*/
63-
assign( d1: number, d2: number, x1: number, y1: number, out: Float64Array, stride: number, offset: number ): Float64Array;
67+
assign( d1: number, d2: number, x1: number, y1: number, out: Float64Array, stride: number, offset: number ): Float64Array;
6468
}
6569

6670
/**
@@ -76,10 +80,15 @@ interface Routine {
7680
* @returns - output array containing the rotation parameters
7781
*
7882
* @example
83+
* var out = drotmg( 3.0, 4.0, 1.5, 2.5 );
84+
* // returns <Float64Array>[ 1.0, 0.45, 0.0, 0.0, 0.6 ]
85+
*
86+
* @example
7987
* var Float64Array = require( '@stdlib/array/float64' );
8088
*
81-
* var out = drotmg( 1.0, 1.0, 1.0, 0.0 );
82-
* // returns <Float64Array>[ 0.0, 1.0, 0.0, 1.0, 0.0 ]
89+
* var out = new Float64Array( 4 );
90+
* var y = drotg.assign( 3.0, 4.0, 1.5, 2.5 out, 1, 0 );
91+
* // returns <Float64Array>[ 1.0, 0.45, 0.0, 0.0, 0.6 ]
8392
*
8493
* var bool = (y === out);
8594
* // returns true
@@ -88,4 +97,4 @@ declare var drotmg: Routine;
8897

8998
// EXPORTS //
9099

91-
export = drotmg;
100+
export = drotmg;

lib/node_modules/@stdlib/blas/base/drotmg/docs/types/test.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ import drotmg = require( './index' );
4444
drotmg( 0.0, [], 2.0, 3.0 ); // $ExpectError
4545
drotmg( 0.0, {}, 2.0, 3.0 ); // $ExpectError
4646

47-
drotmg( 0.0, 1.0, true, 3.0 ); // $ExpectError
47+
drotmg( 0.0, 1.0, true, 3.0 ); // $ExpectError
4848
drotmg( 0.0, 1.0, false, 3.0 ); // $ExpectError
4949
drotmg( 0.0, 1.0, null, 3.0 ); // $ExpectError
5050
drotmg( 0.0, 1.0, undefined, 3.0 ); // $ExpectError
5151
drotmg( 0.0, 1.0, '5', 3.0 ); // $ExpectError
5252
drotmg( 0.0, 1.0, [], 3.0 ); // $ExpectError
5353
drotmg( 0.0, 1.0, {}, 3.0 ); // $ExpectError
5454

55-
drotmg( 0.0, 1.0, 2.0, true ); // $ExpectError
55+
drotmg( 0.0, 1.0, 2.0, true ); // $ExpectError
5656
drotmg( 0.0, 1.0, 2.0, false ); // $ExpectError
5757
drotmg( 0.0, 1.0, 2.0, null ); // $ExpectError
5858
drotmg( 0.0, 1.0, 2.0, undefined ); // $ExpectError
@@ -66,8 +66,8 @@ import drotmg = require( './index' );
6666
drotmg(); // $ExpectError
6767
drotmg( 0.0 ); // $ExpectError
6868
drotmg( 0.0, 1.0 ); // $ExpectError
69-
drotmg( 0.0, 1.0, 2.0 ); // $ExpectError
70-
drotmg( 0.0, 1.0, 2.0, 3.0, 4.0 ); // $ExpectError
69+
drotmg( 0.0, 1.0, 2.0 ); // $ExpectError
70+
drotmg( 0.0, 1.0, 2.0, 3.0, 4.0 ); // $ExpectError
7171
}
7272

7373
// Attached to the main export is an `assign` method which returns a Float64Array...
@@ -77,7 +77,7 @@ import drotmg = require( './index' );
7777
drotmg.assign( 0.0, 2.0, 3.0, 4.0, out, 1, 0 ); // $ExpectType Float64Array
7878
}
7979

80-
// The compiler throws an error if the `assign` method is provided a first or second argument which is not a number...
80+
// The compiler throws an error if the `assign` method is provided a first, second, third or fourth argument which is not a number...
8181
{
8282
const out = new Float64Array( 5 );
8383

@@ -97,24 +97,24 @@ import drotmg = require( './index' );
9797
drotmg.assign( 0.0, [], 3.0, 4.0, out, 1, 0 ); // $ExpectError
9898
drotmg.assign( 0.0, {}, 3.0, 4.0, out, 1, 0 ); // $ExpectError
9999

100-
drotmg.assign( 0.0, 2.0 ,true, 4.0, out, 1, 0 ); // $ExpectError
101-
drotmg.assign( 0.0, 2.0 ,false, 4.0, out, 1, 0 ); // $ExpectError
102-
drotmg.assign( 0.0, 2.0 ,null, 4.0, out, 1, 0 ); // $ExpectError
103-
drotmg.assign( 0.0, 2.0 ,undefined, 4.0, out, 1, 0 ); // $ExpectError
104-
drotmg.assign( 0.0, 2.0 ,'5', 4.0, out, 1, 0 ); // $ExpectError
105-
drotmg.assign( 0.0, 2.0 ,[], 4.0, out, 1, 0 ); // $ExpectError
106-
drotmg.assign( 0.0, 2.0 ,{}, 4.0, out, 1, 0 ); // $ExpectError
107-
108-
drotmg.assign( 0.0, true, 3.0, 4.0, out, 1, 0 ); // $ExpectError
109-
drotmg.assign( 0.0, false, 3.0, 4.0, out, 1, 0 ); // $ExpectError
110-
drotmg.assign( 0.0, null, 3.0, 4.0, out, 1, 0 ); // $ExpectError
111-
drotmg.assign( 0.0, undefined, 3.0, 4.0, out, 1, 0 ); // $ExpectError
112-
drotmg.assign( 0.0, '5', 3.0, 4.0, out, 1, 0 ); // $ExpectError
113-
drotmg.assign( 0.0, [], 3.0, 4.0, out, 1, 0 ); // $ExpectError
114-
drotmg.assign( 0.0, {}, 3.0, 4.0, out, 1, 0 ); // $ExpectError
100+
drotmg.assign( 0.0, 2.0, true, 4.0, out, 1, 0 ); // $ExpectError
101+
drotmg.assign( 0.0, 2.0, false, 4.0, out, 1, 0 ); // $ExpectError
102+
drotmg.assign( 0.0, 2.0, null, 4.0, out, 1, 0 ); // $ExpectError
103+
drotmg.assign( 0.0, 2.0, undefined, 4.0, out, 1, 0 ); // $ExpectError
104+
drotmg.assign( 0.0, 2.0, '5', 4.0, out, 1, 0 ); // $ExpectError
105+
drotmg.assign( 0.0, 2.0, [], 4.0, out, 1, 0 ); // $ExpectError
106+
drotmg.assign( 0.0, 2.0, {}, 4.0, out, 1, 0 ); // $ExpectError
107+
108+
drotmg.assign( 0.0, 2.0, 3.0, true, out, 1, 0 ); // $ExpectError
109+
drotmg.assign( 0.0, 2.0, 3.0, false, out, 1, 0 ); // $ExpectError
110+
drotmg.assign( 0.0, 2.0, 3.0, null, out, 1, 0 ); // $ExpectError
111+
drotmg.assign( 0.0, 2.0, 3.0, undefined, out, 1, 0 ); // $ExpectError
112+
drotmg.assign( 0.0, 2.0, 3.0, '5', out, 1, 0 ); // $ExpectError
113+
drotmg.assign( 0.0, 2.0, 3.0, [], out, 1, 0 ); // $ExpectError
114+
drotmg.assign( 0.0, 2.0, 3.0, {}, out, 1, 0 ); // $ExpectError
115115
}
116116

117-
// The compiler throws an error if the `assign` method is provided a fourth argument which is not a number...
117+
// The compiler throws an error if the `assign` method is provided a sixth argument which is not a number...
118118
{
119119
const out = new Float64Array( 5 );
120120

@@ -126,7 +126,7 @@ import drotmg = require( './index' );
126126
drotmg.assign( 1.0, 2.0, 3.0, 4.0, out, {}, 0 ); // $ExpectError
127127
}
128128

129-
// The compiler throws an error if the `assign` method is provided a fifth argument which is not a number...
129+
// The compiler throws an error if the `assign` method is provided a seventh argument which is not a number...
130130
{
131131
const out = new Float64Array( 5 );
132132

@@ -145,11 +145,11 @@ import drotmg = require( './index' );
145145
drotmg.assign(); // $ExpectError
146146
drotmg.assign( 1.0 ); // $ExpectError
147147
drotmg.assign( 1.0, 2.0 ); // $ExpectError
148-
drotmg.assign( 1.0, 2.0, 3.0 ); // $ExpectError
149148
drotmg.assign( 1.0, 2.0, out ); // $ExpectError
150-
drotmg.assign( 1.0, 2.0, 3.0, out ); // $ExpectError
151149
drotmg.assign( 1.0, 2.0, out, 1 ); // $ExpectError
152-
drotmg.assign( 1.0, 2.0, 3.0, out, 1 ); // $ExpectError
153150
drotmg.assign( 1.0, 2.0, out, 1, 0, 1 ); // $ExpectError
154-
drotmg.assign( 1.0, 2.0, 3.0, out, 1, 0, 1 ); // $ExpectError
155-
}
151+
drotmg.assign( 1.0, 2.0, 3.0 ); // $ExpectError
152+
drotmg.assign( 1.0, 2.0, 3.0, out ); // $ExpectError
153+
drotmg.assign( 1.0, 2.0, 3.0, out, 1 ); // $ExpectError
154+
drotmg.assign( 1.0, 2.0, 3.0, out, 1, 0, 1 ); // $ExpectError
155+
}

0 commit comments

Comments
 (0)