Table of Contents

Class CastingImpl

Namespace
NumSharp
Assembly
NumSharp.dll

An ArrayMethod with one input and one output: the cast from From to To (NumPy's castingimpl). Looked up per class pair by GetCastingImpl(DTypeMeta) and consulted by DTypeCasting (can_cast, cast-safety, descriptor adaptation) and by CastDescrToDType(DType, DTypeMeta) (which is how a parametric class learns the instance an operand of another class should become).

public abstract class CastingImpl : ArrayMethod
Inheritance
CastingImpl
Derived
Inherited Members

Constructors

CastingImpl(string, NPY_CASTING, NDArrayMethodFlags, DTypeMeta, DTypeMeta)

protected CastingImpl(string name, NPY_CASTING casting, NDArrayMethodFlags flags, DTypeMeta from, DTypeMeta to)

Parameters

name string
casting NPY_CASTING
flags NDArrayMethodFlags
from DTypeMeta
to DTypeMeta

Properties

From

The source DType class.

public DTypeMeta From { get; }

Property Value

DTypeMeta

IsWithinDType

True for the cast between two instances of the same class.

public bool IsWithinDType { get; }

Property Value

bool

To

The destination DType class.

public DTypeMeta To { get; }

Property Value

DTypeMeta