batgrl.array_types#

Type annotations for numpy arrays.

Module Attributes

cell_dtype

A structured array type that represents a single cell in a terminal.

Cell(shape[, dtype, buffer, offset, ...])

An array of cell_dtype.

Cell0D(shape[, dtype, buffer, offset, ...])

A 0-dimensional array of cell_dtype.

Cell1D(shape[, dtype, buffer, offset, ...])

A 1-dimensional array of cell_dtype.

Cell2D(shape[, dtype, buffer, offset, ...])

A 2-dimensional array of cell_dtype.

Float1D(shape[, dtype, buffer, offset, ...])

A 1-dimensional array of floats.

Float2D(shape[, dtype, buffer, offset, ...])

A 2-dimensional array of floats.

Coords(shape[, dtype, buffer, offset, ...])

An array of 2-dimensional coordinates.

Int1D(shape[, dtype, buffer, offset, ...])

A 1-dimensional array of integers.

Int2D(shape[, dtype, buffer, offset, ...])

A 2-dimensional array of integers.

ULong1D(shape[, dtype, buffer, offset, ...])

A 1-dimensional array of unsigned long.

ULong2D(shape[, dtype, buffer, offset, ...])

A 2-dimensional array of unsigned long.

RGB_1D(shape[, dtype, buffer, offset, ...])

A 1-dimensional array of RGB 24-bit colors.

RGB_2D(shape[, dtype, buffer, offset, ...])

A 2-dimensional array of RGB 24-bit colors.

RGBA_1D(shape[, dtype, buffer, offset, ...])

A 1-dimensional array of RGBA 32-bit colors.

RGBA_2D(shape[, dtype, buffer, offset, ...])

A 2-dimensional array of RGBA 32-bit colors.

Unicode1D(shape[, dtype, buffer, offset, ...])

A 1-dimensional array of unicode characters.

Unicode2D(shape[, dtype, buffer, offset, ...])

A 2-dimensional array of unicode characters.

Enum2D(shape[, dtype, buffer, offset, ...])

A 2-dimensional array of bytes used for enumeration.

RGBM_2D(shape[, dtype, buffer, offset, ...])

A 2-dimensional array of RGB 24-bit colors plus a fourth channel M where non-zero values indicate opaque pixels and zeros indicate fully transparent pixels.

batgrl.array_types.Cell(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

An array of cell_dtype.

alias of ndarray[tuple[int, …], dtype([(‘ord’, ‘<u8’), (‘style’, ‘u1’), (‘fg_color’, ‘u1’, (3,)), (‘bg_color’, ‘u1’, (3,))])]

batgrl.array_types.Cell0D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 0-dimensional array of cell_dtype.

alias of ndarray[tuple[()], dtype([(‘ord’, ‘<u8’), (‘style’, ‘u1’), (‘fg_color’, ‘u1’, (3,)), (‘bg_color’, ‘u1’, (3,))])]

batgrl.array_types.Cell1D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 1-dimensional array of cell_dtype.

alias of ndarray[tuple[int], dtype([(‘ord’, ‘<u8’), (‘style’, ‘u1’), (‘fg_color’, ‘u1’, (3,)), (‘bg_color’, ‘u1’, (3,))])]

batgrl.array_types.Cell2D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 2-dimensional array of cell_dtype.

alias of ndarray[tuple[int, int], dtype([(‘ord’, ‘<u8’), (‘style’, ‘u1’), (‘fg_color’, ‘u1’, (3,)), (‘bg_color’, ‘u1’, (3,))])]

batgrl.array_types.Coords(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

An array of 2-dimensional coordinates.

alias of ndarray[tuple[int, Literal[2]], dtype[float64]]

batgrl.array_types.Enum2D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 2-dimensional array of bytes used for enumeration.

alias of ndarray[tuple[int, int], dtype[uint8]]

batgrl.array_types.Float1D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 1-dimensional array of floats.

alias of ndarray[tuple[int], dtype[float64]]

batgrl.array_types.Float2D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 2-dimensional array of floats.

alias of ndarray[tuple[int, int], dtype[float64]]

batgrl.array_types.Int1D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 1-dimensional array of integers.

alias of ndarray[tuple[int], dtype[int32]]

batgrl.array_types.Int2D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 2-dimensional array of integers.

alias of ndarray[tuple[int, int], dtype[int32]]

batgrl.array_types.RGBA_1D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 1-dimensional array of RGBA 32-bit colors.

alias of ndarray[tuple[int, Literal[4]], dtype[uint8]]

batgrl.array_types.RGBA_2D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 2-dimensional array of RGBA 32-bit colors.

alias of ndarray[tuple[int, int, Literal[4]], dtype[uint8]]

batgrl.array_types.RGBM_2D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 2-dimensional array of RGB 24-bit colors plus a fourth channel M where non-zero values indicate opaque pixels and zeros indicate fully transparent pixels.

alias of ndarray[tuple[int, int, Literal[4]], dtype[uint8]]

batgrl.array_types.RGB_1D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 1-dimensional array of RGB 24-bit colors.

alias of ndarray[tuple[int, Literal[3]], dtype[uint8]]

batgrl.array_types.RGB_2D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 2-dimensional array of RGB 24-bit colors.

alias of ndarray[tuple[int, int, Literal[3]], dtype[uint8]]

batgrl.array_types.ULong1D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 1-dimensional array of unsigned long.

alias of ndarray[tuple[int], dtype[uint64]]

batgrl.array_types.ULong2D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 2-dimensional array of unsigned long.

alias of ndarray[tuple[int, int], dtype[uint64]]

batgrl.array_types.Unicode1D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 1-dimensional array of unicode characters.

alias of ndarray[tuple[int], dtype[str_]]

batgrl.array_types.Unicode2D(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#

A 2-dimensional array of unicode characters.

alias of ndarray[tuple[int, int], dtype[str_]]

batgrl.array_types.cell_dtype = dtype([('ord', '<u8'), ('style', 'u1'), ('fg_color', 'u1', (3,)), ('bg_color', 'u1', (3,))])#

A structured array type that represents a single cell in a terminal.