As per question, I want to define a numpy type that accepts any numpy floats (i.e. np.float64
, np.float32
etc. Currently I am doing the below, is there a way to bound the NDArray
such any subclass of np.floating
is allowed?
from numpy.typing import NBitBase, NDArray
import numpy as np
any_np_float: NDArray[Any]