Skip to content

Types

siapy.core.types

Type definitions and aliases for SiaPy library.

This module defines common type aliases used throughout the SiaPy library for spectral images, arrays, and data containers to ensure type safety and consistency across the codebase.

SpectralLibType module-attribute

SpectralLibType = BilFile | BipFile | BsqFile

XarrayType module-attribute

XarrayType = DataArray | Dataset

ImageType module-attribute

ImageType = (
    SpectralImage[Any] | NDArray[floating[Any]] | Image
)

ImageSizeType module-attribute

ImageSizeType = int | tuple[int, ...]

ImageDataType module-attribute

ImageDataType = (
    uint8
    | int16
    | int32
    | float32
    | float64
    | complex64
    | complex128
    | uint16
    | uint32
    | int64
    | uint64
)

ImageContainerType module-attribute

ImageContainerType = SpectralImage[Any] | SpectralImageSet

ArrayLike1dType module-attribute

ArrayLike1dType = (
    NDArray[floating[Any]]
    | Series
    | Sequence[Any]
    | ArrayLike
)

ArrayLike2dType module-attribute

ArrayLike2dType = (
    NDArray[floating[Any]]
    | DataFrame
    | Sequence[Any]
    | ArrayLike
)