Skip to content

Commit dfb2392

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents d19823e + 074055b commit dfb2392

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+5280
-8
lines changed

lib/node_modules/@stdlib/blas/base/dgemm/lib/ndarray.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ var base = require( './base.js' );
5454
* @throws {RangeError} third argument must be a nonnegative integer
5555
* @throws {RangeError} fourth argument must be a nonnegative integer
5656
* @throws {RangeError} fifth argument must be a nonnegative integer
57+
* @throws {RangeError} seventeenth argument must be non-zero
58+
* @throws {RangeError} eighteenth argument must be non-zero
5759
* @returns {Float64Array} `C`
5860
*
5961
* @example

lib/node_modules/@stdlib/blas/base/dsyr/lib/ndarray.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ var base = require( './base.js' );
4343
* @throws {TypeError} first argument must specify whether to reference the lower or upper triangular matrix
4444
* @throws {RangeError} second argument must be a nonnegative integer
4545
* @throws {RangeError} fifth argument must be non-zero
46+
* @throws {RangeError} eighth argument must be non-zero
47+
* @throws {RangeError} ninth argument must be non-zero
4648
* @returns {Float64Array} `A`
4749
*
4850
* @example
@@ -64,6 +66,12 @@ function dsyr( uplo, N, alpha, x, strideX, offsetX, A, strideA1, strideA2, offse
6466
if ( strideX === 0 ) {
6567
throw new RangeError( format( 'invalid argument. Fifth argument must be non-zero. Value: `%d`.', strideX ) );
6668
}
69+
if ( strideA1 === 0 ) {
70+
throw new RangeError( format( 'invalid argument. Eighth argument must be non-zero. Value: `%d`.', strideA1 ) );
71+
}
72+
if ( strideA2 === 0 ) {
73+
throw new RangeError( format( 'invalid argument. Ninth argument must be non-zero. Value: `%d`.', strideA2 ) );
74+
}
6775
if ( N === 0 || alpha === 0.0 ) {
6876
return A;
6977
}

lib/node_modules/@stdlib/blas/base/dsyr/test/test.ndarray.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,52 @@ tape( 'the function throws an error if provided an invalid fifth argument', func
139139
}
140140
});
141141

142+
tape( 'the function throws an error if provided an invalid eighth argument', function test( t ) {
143+
var values;
144+
var data;
145+
var i;
146+
147+
data = ru;
148+
149+
values = [
150+
0
151+
];
152+
153+
for ( i = 0; i < values.length; i++ ) {
154+
t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
155+
}
156+
t.end();
157+
158+
function badValue( value ) {
159+
return function badValue() {
160+
dsyr( data.uplo, data.N, data.alpha, new Float64Array( data.x ), data.strideX, data.offsetX, new Float64Array( data.A ), value, data.strideA2, data.offsetA );
161+
};
162+
}
163+
});
164+
165+
tape( 'the function throws an error if provided an invalid ninth argument', function test( t ) {
166+
var values;
167+
var data;
168+
var i;
169+
170+
data = ru;
171+
172+
values = [
173+
0
174+
];
175+
176+
for ( i = 0; i < values.length; i++ ) {
177+
t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
178+
}
179+
t.end();
180+
181+
function badValue( value ) {
182+
return function badValue() {
183+
dsyr( data.uplo, data.N, data.alpha, new Float64Array( data.x ), data.strideX, data.offsetX, new Float64Array( data.A ), data.strideA1, value, data.offsetA );
184+
};
185+
}
186+
});
187+
142188
tape( 'the function performs the symmetric rank 1 operation `A = α*x*x^T + A` (row-major, upper)', function test( t ) {
143189
var expected;
144190
var data;

lib/node_modules/@stdlib/blas/base/dsyr2/lib/ndarray.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ var base = require( './base.js' );
4747
* @throws {RangeError} second argument must be a nonnegative integer
4848
* @throws {RangeError} fifth argument must be non-zero
4949
* @throws {RangeError} eighth argument must be non-zero
50+
* @throws {RangeError} eleventh argument must be non-zero
51+
* @throws {RangeError} twelfth argument must be non-zero
5052
* @returns {Float64Array} `A`
5153
*
5254
* @example
@@ -72,6 +74,12 @@ function dsyr2( uplo, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, str
7274
if ( strideY === 0 ) {
7375
throw new RangeError( format( 'invalid argument. Eighth argument must be non-zero. Value: `%d`.', strideY ) );
7476
}
77+
if ( strideA1 === 0 ) {
78+
throw new RangeError( format( 'invalid argument. Eleventh argument must be non-zero. Value: `%d`.', strideA1 ) );
79+
}
80+
if ( strideA2 === 0 ) {
81+
throw new RangeError( format( 'invalid argument. Twelfth argument must be non-zero. Value: `%d`.', strideA2 ) );
82+
}
7583
if ( N === 0 || alpha === 0.0 ) {
7684
return A;
7785
}

lib/node_modules/@stdlib/blas/base/dsyr2/test/test.ndarray.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,52 @@ tape( 'the function throws an error if provided an invalid eighth argument', fun
168168
}
169169
});
170170

171+
tape( 'the function throws an error if provided an invalid eleventh argument', function test( t ) {
172+
var values;
173+
var data;
174+
var i;
175+
176+
data = ru;
177+
178+
values = [
179+
0
180+
];
181+
182+
for ( i = 0; i < values.length; i++ ) {
183+
t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
184+
}
185+
t.end();
186+
187+
function badValue( value ) {
188+
return function badValue() {
189+
dsyr2( data.uplo, data.N, data.alpha, new Float64Array( data.x ), data.strideX, data.offsetX, new Float64Array( data.y ), data.strideY, data.offsetY, new Float64Array( data.A ), value, data.strideA2, data.offsetA );
190+
};
191+
}
192+
});
193+
194+
tape( 'the function throws an error if provided an invalid twelfth argument', function test( t ) {
195+
var values;
196+
var data;
197+
var i;
198+
199+
data = ru;
200+
201+
values = [
202+
0
203+
];
204+
205+
for ( i = 0; i < values.length; i++ ) {
206+
t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
207+
}
208+
t.end();
209+
210+
function badValue( value ) {
211+
return function badValue() {
212+
dsyr2( data.uplo, data.N, data.alpha, new Float64Array( data.x ), data.strideX, data.offsetX, new Float64Array( data.y ), data.strideY, data.offsetY, new Float64Array( data.A ), data.strideA1, value, data.offsetA );
213+
};
214+
}
215+
});
216+
171217
tape( 'the function performs the symmetric rank 2 operation `A = α*x*y^T + α*y*x^T + A` (row-major, upper)', function test( t ) {
172218
var expected;
173219
var data;

lib/node_modules/@stdlib/blas/base/sgemm/lib/ndarray.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ var base = require( './base.js' );
5454
* @throws {RangeError} third argument must be a nonnegative integer
5555
* @throws {RangeError} fourth argument must be a nonnegative integer
5656
* @throws {RangeError} fifth argument must be a nonnegative integer
57+
* @throws {RangeError} seventeenth argument must be non-zero
58+
* @throws {RangeError} eighteenth argument must be non-zero
5759
* @returns {Float32Array} `C`
5860
*
5961
* @example

lib/node_modules/@stdlib/blas/base/ssyr2/lib/ndarray.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ var base = require( './base.js' );
4747
* @throws {RangeError} second argument must be a nonnegative integer
4848
* @throws {RangeError} fifth argument must be non-zero
4949
* @throws {RangeError} eighth argument must be non-zero
50+
* @throws {RangeError} eleventh argument must be non-zero
51+
* @throws {RangeError} twelfth argument must be non-zero
5052
* @returns {Float32Array} `A`
5153
*
5254
* @example
@@ -72,6 +74,12 @@ function ssyr2( uplo, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, str
7274
if ( strideY === 0 ) {
7375
throw new RangeError( format( 'invalid argument. Eighth argument must be non-zero. Value: `%d`.', strideY ) );
7476
}
77+
if ( strideA1 === 0 ) {
78+
throw new RangeError( format( 'invalid argument. Eleventh argument must be non-zero. Value: `%d`.', strideA1 ) );
79+
}
80+
if ( strideA2 === 0 ) {
81+
throw new RangeError( format( 'invalid argument. Twelfth argument must be non-zero. Value: `%d`.', strideA2 ) );
82+
}
7583
if ( N === 0 || alpha === 0.0 ) {
7684
return A;
7785
}

lib/node_modules/@stdlib/blas/base/ssyr2/test/test.ndarray.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,52 @@ tape( 'the function throws an error if provided an invalid eighth argument', fun
168168
}
169169
});
170170

171+
tape( 'the function throws an error if provided an invalid eleventh argument', function test( t ) {
172+
var values;
173+
var data;
174+
var i;
175+
176+
data = ru;
177+
178+
values = [
179+
0
180+
];
181+
182+
for ( i = 0; i < values.length; i++ ) {
183+
t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
184+
}
185+
t.end();
186+
187+
function badValue( value ) {
188+
return function badValue() {
189+
ssyr2( data.uplo, data.N, data.alpha, new Float32Array( data.x ), data.strideX, data.offsetX, new Float32Array( data.y ), data.strideY, data.offsetY, new Float32Array( data.A ), value, data.strideA2, data.offsetA );
190+
};
191+
}
192+
});
193+
194+
tape( 'the function throws an error if provided an invalid twelfth argument', function test( t ) {
195+
var values;
196+
var data;
197+
var i;
198+
199+
data = ru;
200+
201+
values = [
202+
0
203+
];
204+
205+
for ( i = 0; i < values.length; i++ ) {
206+
t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
207+
}
208+
t.end();
209+
210+
function badValue( value ) {
211+
return function badValue() {
212+
ssyr2( data.uplo, data.N, data.alpha, new Float32Array( data.x ), data.strideX, data.offsetX, new Float32Array( data.y ), data.strideY, data.offsetY, new Float32Array( data.A ), data.strideA1, value, data.offsetA );
213+
};
214+
}
215+
});
216+
171217
tape( 'the function performs the symmetric rank 2 operation `A = α*x*y^T + α*y*x^T + A` (row-major, upper)', function test( t ) {
172218
var expected;
173219
var data;

lib/node_modules/@stdlib/blas/base/wasm/cscal/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ The function has the following additional parameters:
318318
<!-- eslint no-undef: "error" -->
319319

320320
```javascript
321-
var hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
322321
var oneTo = require( '@stdlib/array/one-to' );
323322
var Complex64 = require( '@stdlib/complex/float32/ctor' );
324323
var Complex64Array = require( '@stdlib/array/complex64' );

lib/node_modules/@stdlib/blas/base/wasm/csrot/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ The function has the following additional parameters:
318318
<!-- eslint no-undef: "error" -->
319319

320320
```javascript
321-
var hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
322321
var oneTo = require( '@stdlib/array/one-to' );
323322
var ones = require( '@stdlib/array/ones' );
324323
var zeros = require( '@stdlib/array/zeros' );

0 commit comments

Comments
 (0)