Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment isSameKindCast

  • isSameKindCast(from: string, to: string): boolean
  • Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, 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 cast to another data type

    Example

    var bool = isSameKindCast( 'float32', 'float64' );
    // returns true
    
    bool = isSameKindCast( 'uint16', 'int16' );
    // returns false