Skip to content

Commit 75decbc

Browse files
committed
Add support for complex number typed array constructors
1 parent 5983f53 commit 75decbc

File tree

5 files changed

+18
-3
lines changed

5 files changed

+18
-3
lines changed

lib/node_modules/@stdlib/array/typed-ctors/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ The function returns constructors for the following data types:
5353

5454
- `float32`: single-precision floating-point numbers.
5555
- `float64`: double-precision floating-point numbers.
56+
- `complex64`: single-precision complex floating-point numbers.
57+
- `complex128`: double-precision complex floating-point numbers.
5658
- `int16`: signed 16-bit integers.
5759
- `int32`: signed 32-bit integers.
5860
- `int8`: signed 8-bit integers.

lib/node_modules/@stdlib/array/typed-ctors/docs/repl.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
- float32: single-precision floating-point numbers.
88
- float64: double-precision floating-point numbers.
9+
- complex64: single-precision complex floating-point numbers.
10+
- complex128: double-precision complex floating-point numbers.
911
- int16: signed 16-bit integers.
1012
- int32: signed 32-bit integers.
1113
- int8: signed 8-bit integers.

lib/node_modules/@stdlib/array/typed-ctors/docs/types/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import ctors = require( './index' );
2020

21+
2122
// TESTS //
2223

2324
// The function returns a function or null..

lib/node_modules/@stdlib/array/typed-ctors/lib/ctors.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ var Uint16Array = require( '@stdlib/array/uint16' );
2929
var Uint32Array = require( '@stdlib/array/uint32' );
3030
var Uint8Array = require( '@stdlib/array/uint8' );
3131
var Uint8ClampedArray = require( '@stdlib/array/uint8c' );
32+
var Complex64Array = require( '@stdlib/array/complex64' );
33+
var Complex128Array = require( '@stdlib/array/complex128' );
3234

3335

3436
// MAIN //
@@ -43,7 +45,9 @@ var ctors = {
4345
'uint16': Uint16Array,
4446
'uint32': Uint32Array,
4547
'uint8': Uint8Array,
46-
'uint8c': Uint8ClampedArray
48+
'uint8c': Uint8ClampedArray,
49+
'complex64': Complex64Array,
50+
'complex128': Complex128Array
4751
};
4852

4953

lib/node_modules/@stdlib/array/typed-ctors/test/test.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ var Uint16Array = require( '@stdlib/array/uint16' );
3131
var Uint32Array = require( '@stdlib/array/uint32' );
3232
var Uint8Array = require( '@stdlib/array/uint8' );
3333
var Uint8ClampedArray = require( '@stdlib/array/uint8c' );
34+
var Complex64Array = require( '@stdlib/array/complex64' );
35+
var Complex128Array = require( '@stdlib/array/complex128' );
3436
var isFunction = require( '@stdlib/assert/is-function' );
3537
var ctors = require( './../lib' );
3638

@@ -58,7 +60,9 @@ tape( 'the function returns typed array constructors', function test( t ) {
5860
'uint16',
5961
'uint32',
6062
'uint8',
61-
'uint8c'
63+
'uint8c',
64+
'complex64',
65+
'complex128'
6266
];
6367
expected = [
6468
Float64Array,
@@ -69,7 +73,9 @@ tape( 'the function returns typed array constructors', function test( t ) {
6973
Uint16Array,
7074
Uint32Array,
7175
Uint8Array,
72-
Uint8ClampedArray
76+
Uint8ClampedArray,
77+
Complex64Array,
78+
Complex128Array
7379
];
7480
for ( i = 0; i < dtypes.length; i++ ) {
7581
ctor = ctors( dtypes[ i ] );

0 commit comments

Comments
 (0)