Skip to content

Commit

Permalink
chore: minor clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Sep 28, 2024
1 parent 254fa9e commit 08f9c1a
Show file tree
Hide file tree
Showing 20 changed files with 39 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import cscal = require( './index' );
const cx = new Complex64Array( 10 );
const ca = new Complex64( 2.0, 2.0 );

cscal( '10', ca, cx, 1 ); // $EcxpectError
cscal( '10', ca, cx, 1 ); // $ExpectError
cscal( true, ca, cx, 1 ); // $ExpectError
cscal( false, ca, cx, 1 ); // $ExpectError
cscal( null, ca, cx, 1 ); // $ExpectError
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ interface Namespace {
* @returns result
*
* @example
* var Complex64 = require( '@stdlib/complex/float3/ctor' );
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
*
* var v = ns.scabs1( new Complex64( 5.0, -3.0 ) );
* // returns 8.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// TypeScript Version: 4.1

/**
* Inteface describing `drotg`.
* Interface describing `drotg`.
*/
interface Routine {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ interface Routine {
* var A = new Float64Array( [ 1.0, 2.0, 3.0, 0.0, 1.0, 2.0, 0.0, 0.0, 1.0 ] );
* var x = new Float64Array( [ 1.0, 2.0, 3.0 ] );
*
* dtrmv( row-major', 'upper', 'no-transpose', 'non-unit', 3, A, 3, x, 1 );
* dtrmv( 'row-major', 'upper', 'no-transpose', 'non-unit', 3, A, 3, x, 1 );
* // x => <Float64Array>[ 14.0, 8.0, 3.0 ]
*/
( order: Layout, uplo: MatrixTriangle, trans: TransposeOperation, diag: DiagonalType, N: number, A: Float64Array, LDA: number, x: Float64Array, strideX: number ): Float64Array;
Expand All @@ -60,7 +60,7 @@ interface Routine {
* @param N - number of elements along each dimension in the matrix `A`
* @param A - input matrix
* @param strideA1 - stride of the first dimension of `A`
* @param strideA2 - stride of the first dimension of `A`
* @param strideA2 - stride of the second dimension of `A`
* @param offsetA - starting index for `A`
* @param x - input vector
* @param strideX - `x` stride length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { Complex64 } from '@stdlib/types/complex';
* @returns result
*
* @example
* var Complex64 = require( '@stdlib/complex/float3/ctor' );
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
*
* var v = scabs1( new Complex64( 5.0, -3.0 ) );
* // returns 8.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ interface Routine {
* var x = new Float32Array( [ 1.0, 1.0, 1.0 ] );
* var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
*
* sgemv( 'row-major', 'no-transpose', 3, 3, 1.0, A, 3, x1, -1, 1.0, y1, -1 );
* sgemv( 'row-major', 'no-transpose', 3, 3, 1.0, A, 3, x, -1, 1.0, y, -1 );
* // y => <Float32Array>[ 25.0, 16.0, 7.0 ]
*
* @example
Expand All @@ -122,7 +122,7 @@ interface Routine {
* var x = new Float32Array( [ 1.0, 1.0, 1.0 ] );
* var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
*
* sgemv.ndarray( 'no-transpose', 3, 3, 1.0, A, 3, 1, 0, x1, -1, 2, 1.0, y1, -1, 2 );
* sgemv.ndarray( 'no-transpose', 3, 3, 1.0, A, 3, 1, 0, x, -1, 2, 1.0, y, -1, 2 );
* // y => <Float32Array>[ 25.0, 16.0, 7.0 ]
*/
declare var sgemv: Routine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ interface Routine {
* var A = new Float32Array( [ 1.0, 2.0, 3.0, 0.0, 1.0, 2.0, 0.0, 0.0, 1.0 ] );
* var x = new Float32Array( [ 1.0, 2.0, 3.0 ] );
*
* strmv( row-major', 'upper', 'no-transpose', 'non-unit', 3, A, 3, x, 1 );
* strmv( 'row-major', 'upper', 'no-transpose', 'non-unit', 3, A, 3, x, 1 );
* // x => <Float32Array>[ 14.0, 8.0, 3.0 ]
*/
( order: Layout, uplo: MatrixTriangle, trans: TransposeOperation, diag: DiagonalType, N: number, A: Float32Array, LDA: number, x: Float32Array, strideX: number ): Float32Array;
Expand All @@ -60,7 +60,7 @@ interface Routine {
* @param N - number of elements along each dimension in the matrix `A`
* @param A - input matrix
* @param strideA1 - stride of the first dimension of `A`
* @param strideA2 - stride of the first dimension of `A`
* @param strideA2 - stride of the second dimension of `A`
* @param offsetA - starting index for `A`
* @param x - input vector
* @param strideX - `x` stride length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

import Complex128Array = require( '@stdlib/array/complex64' );
import Complex128Array = require( '@stdlib/array/complex128' );
import zdrot = require( './index' );


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface Routine {
* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
*
* var v = dasumpw( x.length, x, 1 );
* // returns 1.0
* // returns 5.0
*/
( N: number, x: Float64Array, strideX: number ): number;

Expand All @@ -55,7 +55,7 @@ interface Routine {
* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
*
* var v = dasumpw.ndarray( x.length, x, 1, 0 );
* // returns 1.0
* // returns 5.0
*/
ndarray( N: number, x: Float64Array, strideX: number, offsetX: number ): number;
}
Expand All @@ -74,15 +74,15 @@ interface Routine {
* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
*
* var v = dasumpw( x.length, x, 1 );
* // returns 1.0
* // returns 5.0
*
* @example
* var Float64Array = require( '@stdlib/array/float64' );
*
* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
*
* var v = dasumpw.ndarray( x.length, x, 1, 0 );
* // returns 1.0
* // returns 5.0
*/
declare var dasumpw: Routine;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ interface Routine {
* var x = [ 1.0, -2.0, 2.0 ];
*
* var v = gasumpw( x.length, x, 1 );
* // returns 1.0
* // returns 5.0
*/
( N: number, x: NumericArray, stride: number ): number;

Expand All @@ -55,7 +55,7 @@ interface Routine {
* var x = [ 1.0, -2.0, 2.0 ];
*
* var v = gasumpw.ndarray( x.length, x, 1, 0 );
* // returns 1.0
* // returns 5.0
*/
ndarray( N: number, x: NumericArray, stride: number, offset: number ): number;
}
Expand All @@ -72,13 +72,13 @@ interface Routine {
* var x = [ 1.0, -2.0, 2.0 ];
*
* var v = gasumpw( x.length, x, 1 );
* // returns 1.0
* // returns 5.0
*
* @example
* var x = [ 1.0, -2.0, 2.0 ];
*
* var v = gasumpw.ndarray( x.length, x, 1, 0 );
* // returns 1.0
* // returns 5.0
*/
declare var gasumpw: Routine;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface Routine {
* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );
*
* var v = sasumpw( x.length, x, 1 );
* // returns 1.0
* // returns 5.0
*/
( N: number, x: Float32Array, stride: number ): number;

Expand All @@ -55,7 +55,7 @@ interface Routine {
* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );
*
* var v = sasumpw.ndarray( x.length, x, 1, 0 );
* // returns 1.0
* // returns 5.0
*/
ndarray( N: number, x: Float32Array, stride: number, offset: number ): number;
}
Expand All @@ -74,15 +74,15 @@ interface Routine {
* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );
*
* var v = sasumpw( x.length, x, 1 );
* // returns 1.0
* // returns 5.0
*
* @example
* var Float32Array = require( '@stdlib/array/float32' );
*
* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );
*
* var v = sasumpw.ndarray( x.length, x, 1, 0 );
* // returns 1.0
* // returns 5.0
*/
declare var sasumpw: Routine;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ declare function iterCuNoneBy<T, U>( iterator: Iterator<T>, predicate: Predicate

// EXPORTS //

export = iterCuNoneBy ;
export = iterCuNoneBy;
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ interface Options {
* // returns <Date>
*
* v = iter.next().value;
* // returns 2
* // returns <Date>
*
* // ...
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type IteratorFunction = ( iterator: Iterator, ...args: Array<any> ) => any;
*
* @param iter - input iterator
* @throws must provide an iterator
* @returns iterator function result`
* @returns iterator function result
*/
type IteratorThunk = ( iter: Iterator ) => any;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ type HashFunction = ( value?: any ) => any;
* v = iter.next().value;
* // returns 4
*
* var bool = iter.ne
* var bool = iter.next().done;
* // returns true
*/
declare function iterUniqueByHash( iterator: Iterator, hashFcn: HashFunction, thisArg?: any ): Iterator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import dpttrf = require( './index' );

// TESTS //

// The function returns a Float64Array...
// The function returns a number...
{
const D = new Float64Array( 3 );
const E = new Float64Array( 2 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import spttrf = require( './index' );

// TESTS //

// The function returns a Float32Array...
// The function returns a number...
{
const D = new Float32Array( 3 );
const E = new Float32Array( 2 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import { Collection } from '@stdlib/types/array';

/**
* Inteface describing `sincospi`.
* Interface describing `sincospi`.
*/
interface SinCosPi {
/**
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/nlp/lda/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ interface Model {
* @param documents - document corpus
* @param K - number of topics
* @param options - options object
* @param options.alpha - Dirichlet hyper-parameter of topic vector theta:
* @param options.alpha - Dirichlet hyper-parameter of topic vector theta
* @param options.beta - Dirichlet hyper-parameter for word vector phi
* @throws second argument must be a positive integer
* @throws must provide valid options
Expand Down
14 changes: 7 additions & 7 deletions lib/node_modules/@stdlib/nlp/lda/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ import lda = require( './index' );
// The function returns a model object...
{
const arr = [ 'beep', 'boop' ];
lda( arr, 2 ); // #ExpectType Model
lda( arr, 2 ); // $ExpectType Model
}

// The returned model object has a `fit` method to fit a model...
{
const arr = [ 'beep', 'boop' ];
const model = lda( arr, 2 ); // #ExpectType Model
const model = lda( arr, 2 ); // $ExpectType Model
model.fit( 1000, 100, 10 );
}

// The `fit` method of the returned model does not compile if not called with three number arguments...
{
const arr = [ 'beep', 'boop' ];
const model = lda( arr, 2 ); // #ExpectType Model
const model = lda( arr, 2 ); // $ExpectType Model
model.fit( false, 100, 10 ); // $ExpectError
model.fit( true, 100, 10 ); // $ExpectError
model.fit( 'abc', 100, 10 ); // $ExpectError
Expand Down Expand Up @@ -66,16 +66,16 @@ import lda = require( './index' );
// The returned model object has a `getTerms` method to retrieve an array of terms...
{
const arr = [ 'beep', 'boop' ];
const model = lda( arr, 2 ); // #ExpectType Model
const model = lda( arr, 2 ); // $ExpectType Model
model.fit( 1000, 100, 10 );
model.getTerms( 2, 10 ); // #ExpectType Term[]
model.getTerms( 2 ); // #ExpectType Term[]
model.getTerms( 2, 10 ); // $ExpectType Term[]
model.getTerms( 2 ); // $ExpectType Term[]
}

// The `getTerms` method of the returned model does not compile if not called with number arguments...
{
const arr = [ 'beep', 'boop' ];
const model = lda( arr, 2 ); // #ExpectType Model
const model = lda( arr, 2 ); // $ExpectType Model
model.getTerms( false, 10 ); // $ExpectError
model.getTerms( true, 10 ); // $ExpectError
model.getTerms( 'abc', 10 ); // $ExpectError
Expand Down

0 comments on commit 08f9c1a

Please sign in to comment.