Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Oct 31, 2023
1 parent 33941b1 commit bffb3ae
Show file tree
Hide file tree
Showing 4 changed files with 1,474 additions and 3 deletions.
20 changes: 20 additions & 0 deletions base/assert/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import isDataType = require( './../../../../base/assert/is-data-type' );
import isFloatingPointDataType = require( './../../../../base/assert/is-floating-point-data-type' );
import isIndexMode = require( './../../../../base/assert/is-index-mode' );
import isIntegerDataType = require( './../../../../base/assert/is-integer-data-type' );
import isMostlySafeDataTypeCast = require( './../../../../base/assert/is-mostly-safe-data-type-cast' );
import isNumericDataType = require( './../../../../base/assert/is-numeric-data-type' );
import isOrder = require( './../../../../base/assert/is-order' );
import isReadOnly = require( './../../../../base/assert/is-read-only' );
Expand Down Expand Up @@ -131,6 +132,9 @@ interface Namespace {
* bool = ns.isCastingMode( 'safe' );
* // returns true
*
* bool = ns.isCastingMode( 'mostly-safe' );
* // returns true
*
* bool = ns.isCastingMode( 'same-kind' );
* // returns true
*
Expand Down Expand Up @@ -432,6 +436,22 @@ interface Namespace {
*/
isIntegerDataType: typeof isIntegerDataType;

/**
* Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type.
*
* @param from - ndarray data type
* @param to - ndarray data type
* @returns boolean indicating if a data type can be cast to another data type
*
* @example
* var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' );
* // returns true
*
* bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' );
* // returns false
*/
isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast;

/**
* Tests whether an input value is a supported ndarray numeric data type.
*
Expand Down
Loading

0 comments on commit bffb3ae

Please sign in to comment.