itkwasm.to_numpy_array

Module Contents

Functions

array_like_to_numpy_array

Convert a numpy array-like to a numpy ndarray.

array_like_to_bytes

Convert a numpy array-like to bytes.

buffer_to_numpy_array

_dtype_to_component_type

API

itkwasm.to_numpy_array.array_like_to_numpy_array(arr: numpy.typing.ArrayLike) numpy.ndarray

Convert a numpy array-like to a numpy ndarray.

Parameters:

arr (ArrayLike) – numpy ndarray like

Returns:

Numpy array

Return type:

np.ndarray

itkwasm.to_numpy_array.array_like_to_bytes(arr: numpy.typing.ArrayLike) bytes

Convert a numpy array-like to bytes.

itkwasm.to_numpy_array.buffer_to_numpy_array(component_type: Union[itkwasm.int_types.IntTypes, itkwasm.float_types.FloatTypes], buf)
itkwasm.to_numpy_array._dtype_to_component_type(dtype)