@stdlib/ndarray-base-assert-is-real-floating-point-data-type
v0.2.2
Published
Test if an input value is a supported ndarray real-valued floating-point data type.
Downloads
13
Readme
isRealFloatingPointDataType
Test if an input value is a supported ndarray real-valued floating-point data type.
Installation
npm install @stdlib/ndarray-base-assert-is-real-floating-point-data-type
Usage
var isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' );
isRealFloatingPointDataType( value )
Tests if an input value
is a supported ndarray real-valued floating-point data type.
var bool = isRealFloatingPointDataType( 'float32' );
// returns true
bool = isRealFloatingPointDataType( 'uint32' );
// returns false
Examples
var isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' );
var bool = isRealFloatingPointDataType( 'binary' );
// returns false
bool = isRealFloatingPointDataType( 'float32' );
// returns true
bool = isRealFloatingPointDataType( 'float64' );
// returns true
bool = isRealFloatingPointDataType( 'generic' );
// returns false
bool = isRealFloatingPointDataType( 'int16' );
// returns false
bool = isRealFloatingPointDataType( 'int32' );
// returns false
bool = isRealFloatingPointDataType( 'int8' );
// returns false
bool = isRealFloatingPointDataType( 'uint16' );
// returns false
bool = isRealFloatingPointDataType( 'uint32' );
// returns false
bool = isRealFloatingPointDataType( 'uint8' );
// returns false
bool = isRealFloatingPointDataType( 'uint8c' );
// returns false
bool = isRealFloatingPointDataType( '' );
// returns false
bool = isRealFloatingPointDataType( '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.