@stdlib/ndarray-base-assert-is-complex-floating-point-data-type
v0.2.2
Published
Test if an input value is a supported ndarray complex-valued floating-point data type.
Downloads
47
Readme
isComplexFloatingPointDataType
Test if an input value is a supported ndarray complex-valued floating-point data type.
Installation
npm install @stdlib/ndarray-base-assert-is-complex-floating-point-data-type
Usage
var isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' );
isComplexFloatingPointDataType( value )
Tests if an input value
is a supported ndarray complex-valued floating-point data type.
var bool = isComplexFloatingPointDataType( 'complex128' );
// returns true
bool = isComplexFloatingPointDataType( 'uint32' );
// returns false
Examples
var isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' );
var bool = isComplexFloatingPointDataType( 'binary' );
// returns false
bool = isComplexFloatingPointDataType( 'complex128' );
// returns true
bool = isComplexFloatingPointDataType( 'complex64' );
// returns true
bool = isComplexFloatingPointDataType( 'float32' );
// returns false
bool = isComplexFloatingPointDataType( 'float64' );
// returns false
bool = isComplexFloatingPointDataType( 'generic' );
// returns false
bool = isComplexFloatingPointDataType( 'int16' );
// returns false
bool = isComplexFloatingPointDataType( 'int32' );
// returns false
bool = isComplexFloatingPointDataType( 'int8' );
// returns false
bool = isComplexFloatingPointDataType( 'uint16' );
// returns false
bool = isComplexFloatingPointDataType( 'uint32' );
// returns false
bool = isComplexFloatingPointDataType( 'uint8' );
// returns false
bool = isComplexFloatingPointDataType( 'uint8c' );
// returns false
bool = isComplexFloatingPointDataType( '' );
// returns false
bool = isComplexFloatingPointDataType( 'foo' );
// returns false
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.