Arrays#
Array creation and debugging helper function. For example:
>>> a = hpk.empty([3, 5, 7], dtype=np.float64)
>>> hpk.inspect(a)
>>> b = hpk.empty([3, 5, 7], dtype=np.complex128)
>>> b.setflags(write=False)
>>> hpk.inspect(b)
FUNCTIONS
- hpk.empty(n: int, dtype: object) ArrayLike #
- hpk.empty(shape: Sequence[int], dtype: object) ArrayLike
Overloaded function.
empty(n: int, dtype: object) -> ArrayLike
Return a new 1D array of
n
elements of typedtype
, without initializing entries. The array is aligned to a cacheline boundary.empty(shape: Sequence[int], dtype: object) -> ArrayLike
Return a new array of given shape and type, without initializing entries. The array has row-major (C-style) order in memory and is aligned to a cacheline boundary.
- hpk.inspect(a: ndarray[]) None #
- hpk.inspect(a: ndarray[writable=False] | None) None
Overloaded function.
inspect(a: ndarray[]) -> None
Prints information about the array. The shape is given in dtype units, which may be complex. The stride is given in real units.
inspect(a: ndarray[writable=False] | None) -> None
Prints information about the array. The shape is given in dtype units, which may be complex. The stride is given in real units.