Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ bool = isFloatingPointDataType( 'uint32' );
```javascript
var isFloatingPointDataType = require( '@stdlib/array/base/assert/is-floating-point-data-type' );

var bool = isFloatingPointDataType( 'float32' );
var bool = isFloatingPointDataType( 'float16' );
// returns true

bool = isFloatingPointDataType( 'float32' );
// returns true

bool = isFloatingPointDataType( 'float64' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ bench( pkg, function benchmark( b ) {

values = [
'binary',
'float16',
'float32',
'float64',
'generic',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

Examples
--------
> var bool = {{alias}}( 'float32' )
> var bool = {{alias}}( 'float16' )
true
> bool = {{alias}}( 'float32' )
true
> bool = {{alias}}( 'float64' )
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
* @returns boolean indicating whether an input value is a supported array floating-point data type
*
* @example
* var bool = isFloatingPointDataType( 'float32' );
* var bool = isFloatingPointDataType( 'float16' );
* // returns true
*
* bool = isFloatingPointDataType( 'float32' );
* // returns true
*
* bool = isFloatingPointDataType( 'float64' );
Expand Down Expand Up @@ -58,7 +61,7 @@
* bool = isFloatingPointDataType( 'foo' );
* // returns false
*/
declare function isFloatingPointDataType( v: any ): boolean;

Check warning on line 64 in lib/node_modules/@stdlib/array/base/assert/is-floating-point-data-type/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type


// EXPORTS //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@

var isFloatingPointDataType = require( './../lib' );

var bool = isFloatingPointDataType( 'float32' );
var bool = isFloatingPointDataType( 'float16' );
console.log( bool );
// => true

bool = isFloatingPointDataType( 'float32' );
console.log( bool );
// => true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
* @example
* var isFloatingPointDataType = require( '@stdlib/array/base/assert/is-floating-point-data-type' );
*
* var bool = isFloatingPointDataType( 'float32' );
* var bool = isFloatingPointDataType( 'float16' );
* // returns true
*
* bool = isFloatingPointDataType( 'float32' );
* // returns true
*
* bool = isFloatingPointDataType( 'float64' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ var dtypes = require( '@stdlib/array/dtypes' );
* @returns {boolean} boolean indicating whether an input value is a supported array floating-point data type
*
* @example
* var bool = isFloatingPointDataType( 'float32' );
* var bool = isFloatingPointDataType( 'float16' );
* // returns true
*
* bool = isFloatingPointDataType( 'float32' );
* // returns true
*
* bool = isFloatingPointDataType( 'float64' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ tape( 'the function returns `true` if provided a supported array floating-point
values = [
'complex64',
'complex128',
'float16',
'float32',
'float64'
];
Expand Down