Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/node_modules/@stdlib/array/typed-float-ctors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ var ctor = ctors( 'float64' );

The function returns constructors for the following data types:

- `float16`: half-precision floating-point numbers.
- `float32`: single-precision floating-point numbers.
- `float64`: double-precision floating-point numbers.
- `complex64`: single-precision complex floating-point numbers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

The function returns constructors for the following data types:

- float16: half-precision floating-point numbers.
- float32: single-precision floating-point numbers.
- float64: double-precision floating-point numbers.
- complex64: single-precision complex floating-point numbers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import Complex128Array = require( '@stdlib/array/complex128' );
import Complex64Array = require( '@stdlib/array/complex64' );
import Float16Array = require( '@stdlib/array/float16' );

/**
* Returns a `Float64Array` constructor.
Expand All @@ -45,6 +46,18 @@ declare function ctors( dtype: 'float64' ): typeof Float64Array;
*/
declare function ctors( dtype: 'float32' ): typeof Float32Array;

/**
* Returns a `Float16Array` constructor.
*
* @param dtype - data type
* @returns constructor
*
* @example
* var ctor = ctors( 'float16' );
* // returns <Function>
*/
declare function ctors( dtype: 'float16' ): typeof Float16Array;

/**
* Returns a `Complex128Array` constructor.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import ctors = require( './index' );
{
ctors( 'float64' ); // $ExpectType Float64ArrayConstructor
ctors( 'float32' ); // $ExpectType Float32ArrayConstructor
ctors( 'float16' ); // $ExpectType Float16ArrayConstructor
ctors( 'complex128' ); // $ExpectType Complex128ArrayConstructor
ctors( 'complex64' ); // $ExpectType Complex64ArrayConstructor
ctors( 'float' ); // $ExpectType Function | null
Expand Down
2 changes: 2 additions & 0 deletions lib/node_modules/@stdlib/array/typed-float-ctors/lib/ctors.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

var Float64Array = require( '@stdlib/array/float64' );
var Float32Array = require( '@stdlib/array/float32' );
var Float16Array = require( '@stdlib/array/float16' );
var Complex128Array = require( '@stdlib/array/complex128' );
var Complex64Array = require( '@stdlib/array/complex64' );

Expand All @@ -32,6 +33,7 @@ var Complex64Array = require( '@stdlib/array/complex64' );
var ctors = {
'float64': Float64Array,
'float32': Float32Array,
'float16': Float16Array,
'complex128': Complex128Array,
'complex64': Complex64Array
};
Expand Down
3 changes: 3 additions & 0 deletions lib/node_modules/@stdlib/array/typed-float-ctors/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var tape = require( 'tape' );
var dtypes = require( '@stdlib/array/typed-float-dtypes' );
var Float64Array = require( '@stdlib/array/float64' );
var Float32Array = require( '@stdlib/array/float32' );
var Float16Array = require( '@stdlib/array/float16' );
var Complex128Array = require( '@stdlib/array/complex128' );
var Complex64Array = require( '@stdlib/array/complex64' );
var isFunction = require( '@stdlib/assert/is-function' );
Expand All @@ -47,12 +48,14 @@ tape( 'the function returns typed array constructors', function test( t ) {
dtypes = [
'float64',
'float32',
'float16',
'complex128',
'complex64'
];
expected = [
Float64Array,
Float32Array,
Float16Array,
Complex128Array,
Complex64Array
];
Expand Down