Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ndarray/base/assert/is-safe-data-type-cast/docs/types/index.d"

Index

Functions

Functions

Export assignment isSafeCast

  • isSafeCast(from: string, to: string): boolean
  • Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type.

    Parameters

    • from: string

      ndarray data type

    • to: string

      ndarray data type

    Returns boolean

    boolean indicating if a data type can be safely cast to another data type

    Example

    var bool = isSafeCast( 'float32', 'float64' );
    // returns true
    
    bool = isSafeCast( 'float64', 'int32' );
    // returns false