File tree Expand file tree Collapse file tree 5 files changed +35
-1
lines changed
lib/node_modules/@stdlib/ndarray/dtypes Expand file tree Collapse file tree 5 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ The function supports the following data type kinds:
8080- ` integral ` : integer data types.
8181- ` signed_integer ` : signed integer data types.
8282- ` unsigned_integer ` : unsigned integer data types.
83+ - ` real ` : real-valued data types.
8384- ` numeric ` : numeric data types.
8485- ` all ` : all data types.
8586
Original file line number Diff line number Diff line change 2727 - integral: integer data types.
2828 - signed_integer: signed integer data types.
2929 - unsigned_integer: unsigned integer data types.
30+ - real: real-valued data types.
3031 - numeric: numeric data types.
3132 - all: all data types.
3233
Original file line number Diff line number Diff line change 2121/**
2222* Data type kind.
2323*/
24- type Kind = 'all' | 'numeric' | 'floating_point' | 'real_floating_point' | 'complex_floating_point' | 'integral' | 'signed_integer' | 'unsigned_integer' ; // tslint-disable-line max-line-length
24+ type Kind = 'all' | 'numeric' | 'real' | ' floating_point' | 'real_floating_point' | 'complex_floating_point' | 'integral' | 'signed_integer' | 'unsigned_integer' ; // tslint-disable-line max-line-length
2525
2626/**
2727* Returns a list of ndarray data types.
Original file line number Diff line number Diff line change 4848 " uint8" ,
4949 " uint8c"
5050 ],
51+ "real" : [
52+ " float32" ,
53+ " float64" ,
54+ " int16" ,
55+ " int32" ,
56+ " int8" ,
57+ " uint16" ,
58+ " uint32" ,
59+ " uint8" ,
60+ " uint8c"
61+ ],
5162 "numeric" : [
5263 " complex64" ,
5364 " complex128" ,
Original file line number Diff line number Diff line change @@ -199,6 +199,27 @@ tape( 'the function supports returning a list of unsigned integer ndarray data t
199199 t . end ( ) ;
200200} ) ;
201201
202+ tape ( 'the function supports returning a list of real-valued ndarray data types' , function test ( t ) {
203+ var expected ;
204+ var actual ;
205+
206+ expected = [
207+ 'float32' ,
208+ 'float64' ,
209+ 'int16' ,
210+ 'int32' ,
211+ 'int8' ,
212+ 'uint16' ,
213+ 'uint32' ,
214+ 'uint8' ,
215+ 'uint8c'
216+ ] ;
217+ actual = dtypes ( 'real' ) ;
218+
219+ t . deepEqual ( actual , expected , 'returns expected value' ) ;
220+ t . end ( ) ;
221+ } ) ;
222+
202223tape ( 'the function supports returning a list of numeric ndarray data types' , function test ( t ) {
203224 var expected ;
204225 var actual ;
You can’t perform that action at this time.
0 commit comments