Skip to content

Latest commit

 

History

History

is-real-data-type

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

isRealDataType

Test if an input value is a supported array real-valued data type.

Usage

var isRealDataType = require( '@stdlib/array/base/assert/is-real-data-type' );

isRealDataType( value )

Tests if an input value is a supported array real-valued data type.

var bool = isRealDataType( 'float32' );
// returns true

bool = isRealDataType( 'uint32' );
// returns true

Examples

var isRealDataType = require( '@stdlib/array/base/assert/is-real-data-type' );

var bool = isRealDataType( 'float32' );
// returns true

bool = isRealDataType( 'float64' );
// returns true

bool = isRealDataType( 'complex128' );
// returns false

bool = isRealDataType( 'generic' );
// returns false

bool = isRealDataType( 'int16' );
// returns true

bool = isRealDataType( 'int32' );
// returns true

bool = isRealDataType( 'int8' );
// returns true

bool = isRealDataType( 'uint16' );
// returns true

bool = isRealDataType( 'uint32' );
// returns true

bool = isRealDataType( 'uint8' );
// returns true

bool = isRealDataType( 'uint8c' );
// returns true

bool = isRealDataType( '' );
// returns false

bool = isRealDataType( 'foo' );
// returns false