pytomography.io.PET.prd._binary#

Module Contents#

Classes#

BinaryProtocolWriter

Helper class that provides a standard way to create an ABC using

BinaryProtocolReader

Helper class that provides a standard way to create an ABC using

CodedOutputStream

CodedInputStream

TypeSerializer

Abstract base class for generic types.

StructSerializer

Abstract base class for generic types.

BoolSerializer

Abstract base class for generic types.

Int8Serializer

Abstract base class for generic types.

UInt8Serializer

Abstract base class for generic types.

Int16Serializer

Abstract base class for generic types.

UInt16Serializer

Abstract base class for generic types.

Int32Serializer

Abstract base class for generic types.

UInt32Serializer

Abstract base class for generic types.

Int64Serializer

Abstract base class for generic types.

UInt64Serializer

Abstract base class for generic types.

SizeSerializer

Abstract base class for generic types.

Float32Serializer

Abstract base class for generic types.

Float64Serializer

Abstract base class for generic types.

Complex32Serializer

Abstract base class for generic types.

Complex64Serializer

Abstract base class for generic types.

StringSerializer

Abstract base class for generic types.

DateSerializer

Abstract base class for generic types.

TimeSerializer

Abstract base class for generic types.

DateTimeSerializer

Abstract base class for generic types.

NoneSerializer

Abstract base class for generic types.

EnumSerializer

Abstract base class for generic types.

OptionalSerializer

Abstract base class for generic types.

UnionCaseProtocol

Base class for protocol classes.

UnionSerializer

Abstract base class for generic types.

StreamSerializer

Abstract base class for generic types.

FixedVectorSerializer

Abstract base class for generic types.

VectorSerializer

Abstract base class for generic types.

MapSerializer

Abstract base class for generic types.

NDArraySerializerBase

Abstract base class for generic types.

DynamicNDArraySerializer

Abstract base class for generic types.

NDArraySerializer

Abstract base class for generic types.

FixedNDArraySerializer

Abstract base class for generic types.

RecordSerializer

Abstract base class for generic types.

Functions#

write_fixed_int32(stream, value)

read_fixed_int32(stream)

Attributes#

MAGIC_BYTES

CURRENT_BINARY_FORMAT_VERSION

INT8_MIN

INT8_MAX

UINT8_MAX

INT16_MIN

INT16_MAX

UINT16_MAX

INT32_MIN

INT32_MAX

UINT32_MAX

INT64_MIN

INT64_MAX

UINT64_MAX

T

T_NP

bool_serializer

int8_serializer

uint8_serializer

int16_serializer

uint16_serializer

int32_serializer

uint32_serializer

int64_serializer

uint64_serializer

size_serializer

float32_serializer

float64_serializer

complexfloat32_serializer

complexfloat64_serializer

string_serializer

EPOCH_ORDINAL_DAYS

DATETIME_DAYS_DTYPE

date_serializer

TIMEDELTA_NANOSECONDS_DTYPE

time_serializer

DATETIME_NANOSECONDS_DTYPE

EPOCH_DATETIME

datetime_serializer

none_serializer

TEnum

TKey

TKey_NP

TValue

TValue_NP

int32_struct

pytomography.io.PET.prd._binary.MAGIC_BYTES: bytes = b'yardl'[source]#
pytomography.io.PET.prd._binary.CURRENT_BINARY_FORMAT_VERSION: int = 1[source]#
pytomography.io.PET.prd._binary.INT8_MIN: int[source]#
pytomography.io.PET.prd._binary.INT8_MAX: int[source]#
pytomography.io.PET.prd._binary.UINT8_MAX: int[source]#
pytomography.io.PET.prd._binary.INT16_MIN: int[source]#
pytomography.io.PET.prd._binary.INT16_MAX: int[source]#
pytomography.io.PET.prd._binary.UINT16_MAX: int[source]#
pytomography.io.PET.prd._binary.INT32_MIN: int[source]#
pytomography.io.PET.prd._binary.INT32_MAX: int[source]#
pytomography.io.PET.prd._binary.UINT32_MAX: int[source]#
pytomography.io.PET.prd._binary.INT64_MIN: int[source]#
pytomography.io.PET.prd._binary.INT64_MAX: int[source]#
pytomography.io.PET.prd._binary.UINT64_MAX: int[source]#
class pytomography.io.PET.prd._binary.BinaryProtocolWriter(stream, schema)[source]#

Bases: pytomography.io.PET.prd.yardl_types.ABC

Helper class that provides a standard way to create an ABC using inheritance.

Parameters:
  • stream (pytomography.io.PET.prd.yardl_types.Union[BinaryIO, str]) –

  • schema (str) –

close()[source]#
Return type:

None

_end_stream()[source]#
Return type:

None

class pytomography.io.PET.prd._binary.BinaryProtocolReader(stream, expected_schema)[source]#

Bases: pytomography.io.PET.prd.yardl_types.ABC

Helper class that provides a standard way to create an ABC using inheritance.

Parameters:
  • stream (pytomography.io.PET.prd.yardl_types.Union[io.BufferedReader, io.BytesIO, BinaryIO, str]) –

  • expected_schema (Optional[str]) –

close()[source]#
Return type:

None

class pytomography.io.PET.prd._binary.CodedOutputStream(stream, *, buffer_size=65536)[source]#
Parameters:
  • stream (pytomography.io.PET.prd.yardl_types.Union[BinaryIO, str]) –

  • buffer_size (int) –

close()[source]#
Return type:

None

ensure_capacity(size)[source]#
Parameters:

size (int) –

Return type:

None

flush()[source]#
Return type:

None

write(formatter, *args)[source]#
Parameters:
  • formatter (struct.Struct) –

  • args (Any) –

Return type:

None

write_bytes(data)[source]#
Parameters:

data (pytomography.io.PET.prd.yardl_types.Union[bytes, bytearray]) –

Return type:

None

write_bytes_directly(data)[source]#
Parameters:

data (pytomography.io.PET.prd.yardl_types.Union[bytes, bytearray, memoryview]) –

Return type:

None

write_byte_no_check(value)[source]#
Parameters:

value (int) –

Return type:

None

write_unsigned_varint(value)[source]#
Parameters:

value (pytomography.io.PET.prd.yardl_types.Union[int, pytomography.io.PET.prd.yardl_types.np.uint8, pytomography.io.PET.prd.yardl_types.np.uint16, pytomography.io.PET.prd.yardl_types.np.uint32, pytomography.io.PET.prd.yardl_types.np.uint64]) –

Return type:

None

zigzag_encode(value)[source]#
Parameters:

value (pytomography.io.PET.prd.yardl_types.Union[int, pytomography.io.PET.prd.yardl_types.np.int8, pytomography.io.PET.prd.yardl_types.np.int16, pytomography.io.PET.prd.yardl_types.np.int32, pytomography.io.PET.prd.yardl_types.np.int64]) –

Return type:

int

write_signed_varint(value)[source]#
Parameters:

value (pytomography.io.PET.prd.yardl_types.Union[int, pytomography.io.PET.prd.yardl_types.np.int8, pytomography.io.PET.prd.yardl_types.np.int16, pytomography.io.PET.prd.yardl_types.np.int32, pytomography.io.PET.prd.yardl_types.np.int64]) –

Return type:

None

class pytomography.io.PET.prd._binary.CodedInputStream(stream, *, buffer_size=65536)[source]#
Parameters:
  • stream (pytomography.io.PET.prd.yardl_types.Union[io.BufferedReader, io.BytesIO, BinaryIO, str]) –

  • buffer_size (int) –

close()[source]#
Return type:

None

read(formatter)[source]#
Parameters:

formatter (struct.Struct) –

Return type:

tuple[Any, Ellipsis]

read_byte()[source]#
Return type:

int

read_unsigned_varint()[source]#
Return type:

int

zigzag_decode(value)[source]#
Parameters:

value (int) –

Return type:

int

read_signed_varint()[source]#
Return type:

int

read_view(count)[source]#
Parameters:

count (int) –

Return type:

memoryview

read_bytearray(count)[source]#
Parameters:

count (int) –

Return type:

bytearray

_fill_buffer(min_count=0)[source]#
Parameters:

min_count (int) –

Return type:

None

pytomography.io.PET.prd._binary.T[source]#
pytomography.io.PET.prd._binary.T_NP[source]#
class pytomography.io.PET.prd._binary.TypeSerializer(dtype)[source]#

Bases: pytomography.io.PET.prd.yardl_types.Generic[T, T_NP], pytomography.io.PET.prd.yardl_types.ABC

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:

dtype (numpy.typing.DTypeLike) –

overall_dtype()[source]#
Return type:

pytomography.io.PET.prd.yardl_types.np.dtype[Any]

struct_format_str()[source]#
Return type:

Optional[str]

abstract write(stream, value)[source]#
Parameters:
Return type:

None

abstract write_numpy(stream, value)[source]#
Parameters:
Return type:

None

abstract read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

T

abstract read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

T_NP

is_trivially_serializable()[source]#
Return type:

bool

class pytomography.io.PET.prd._binary.StructSerializer(numpy_type, format_string)[source]#

Bases: TypeSerializer[T, T_NP]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:
  • numpy_type (type) –

  • format_string (str) –

write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

T

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

T_NP

struct_format_str()[source]#
Return type:

str

class pytomography.io.PET.prd._binary.BoolSerializer[source]#

Bases: StructSerializer[bool, pytomography.io.PET.prd.yardl_types.np.bool_]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

bool

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.bool_

pytomography.io.PET.prd._binary.bool_serializer[source]#
class pytomography.io.PET.prd._binary.Int8Serializer[source]#

Bases: StructSerializer[pytomography.io.PET.prd.yardl_types.Int8, pytomography.io.PET.prd.yardl_types.np.int8]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.Int8

is_trivially_serializable()[source]#
Return type:

bool

pytomography.io.PET.prd._binary.int8_serializer[source]#
class pytomography.io.PET.prd._binary.UInt8Serializer[source]#

Bases: StructSerializer[pytomography.io.PET.prd.yardl_types.UInt8, pytomography.io.PET.prd.yardl_types.np.uint8]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.UInt8

is_trivially_serializable()[source]#
Return type:

bool

pytomography.io.PET.prd._binary.uint8_serializer[source]#
class pytomography.io.PET.prd._binary.Int16Serializer[source]#

Bases: TypeSerializer[pytomography.io.PET.prd.yardl_types.Int16, pytomography.io.PET.prd.yardl_types.np.int16]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.Int16) –

Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.int16) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.Int16

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.int16

pytomography.io.PET.prd._binary.int16_serializer[source]#
class pytomography.io.PET.prd._binary.UInt16Serializer[source]#

Bases: TypeSerializer[pytomography.io.PET.prd.yardl_types.UInt16, pytomography.io.PET.prd.yardl_types.np.uint16]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.UInt16) –

Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.uint16) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.UInt16

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.uint16

pytomography.io.PET.prd._binary.uint16_serializer[source]#
class pytomography.io.PET.prd._binary.Int32Serializer[source]#

Bases: TypeSerializer[pytomography.io.PET.prd.yardl_types.Int32, pytomography.io.PET.prd.yardl_types.np.int32]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.Int32) –

Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.int32) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.Int32

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.int32

pytomography.io.PET.prd._binary.int32_serializer[source]#
class pytomography.io.PET.prd._binary.UInt32Serializer[source]#

Bases: TypeSerializer[pytomography.io.PET.prd.yardl_types.UInt32, pytomography.io.PET.prd.yardl_types.np.uint32]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.UInt32) –

Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.uint32) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.UInt32

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.uint32

pytomography.io.PET.prd._binary.uint32_serializer[source]#
class pytomography.io.PET.prd._binary.Int64Serializer[source]#

Bases: TypeSerializer[pytomography.io.PET.prd.yardl_types.Int64, pytomography.io.PET.prd.yardl_types.np.int64]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.Int64) –

Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.int64) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.Int64

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.int64

pytomography.io.PET.prd._binary.int64_serializer[source]#
class pytomography.io.PET.prd._binary.UInt64Serializer[source]#

Bases: TypeSerializer[pytomography.io.PET.prd.yardl_types.UInt64, pytomography.io.PET.prd.yardl_types.np.uint64]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.UInt64) –

Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.uint64) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.UInt64

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.uint64

pytomography.io.PET.prd._binary.uint64_serializer[source]#
class pytomography.io.PET.prd._binary.SizeSerializer[source]#

Bases: TypeSerializer[pytomography.io.PET.prd.yardl_types.Size, pytomography.io.PET.prd.yardl_types.np.uint64]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.Size) –

Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.uint64) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.Size

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.uint64

pytomography.io.PET.prd._binary.size_serializer[source]#
class pytomography.io.PET.prd._binary.Float32Serializer[source]#

Bases: StructSerializer[pytomography.io.PET.prd.yardl_types.Float32, pytomography.io.PET.prd.yardl_types.np.float32]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.Float32

is_trivially_serializable()[source]#
Return type:

bool

pytomography.io.PET.prd._binary.float32_serializer[source]#
class pytomography.io.PET.prd._binary.Float64Serializer[source]#

Bases: StructSerializer[pytomography.io.PET.prd.yardl_types.Float64, pytomography.io.PET.prd.yardl_types.np.float64]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.Float64

is_trivially_serializable()[source]#
Return type:

bool

pytomography.io.PET.prd._binary.float64_serializer[source]#
class pytomography.io.PET.prd._binary.Complex32Serializer[source]#

Bases: StructSerializer[pytomography.io.PET.prd.yardl_types.ComplexFloat, pytomography.io.PET.prd.yardl_types.np.complex64]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.ComplexFloat) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.ComplexFloat

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.complex64

is_trivially_serializable()[source]#
Return type:

bool

pytomography.io.PET.prd._binary.complexfloat32_serializer[source]#
class pytomography.io.PET.prd._binary.Complex64Serializer[source]#

Bases: StructSerializer[pytomography.io.PET.prd.yardl_types.ComplexDouble, pytomography.io.PET.prd.yardl_types.np.complex128]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.ComplexDouble) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.ComplexDouble

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.complex128

is_trivially_serializable()[source]#
Return type:

bool

pytomography.io.PET.prd._binary.complexfloat64_serializer[source]#
class pytomography.io.PET.prd._binary.StringSerializer[source]#

Bases: TypeSerializer[str, pytomography.io.PET.prd.yardl_types.np.object_]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.object_) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

str

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.object_

pytomography.io.PET.prd._binary.string_serializer[source]#
pytomography.io.PET.prd._binary.EPOCH_ORDINAL_DAYS[source]#
pytomography.io.PET.prd._binary.DATETIME_DAYS_DTYPE[source]#
class pytomography.io.PET.prd._binary.DateSerializer[source]#

Bases: TypeSerializer[pytomography.io.PET.prd.yardl_types.datetime.date, pytomography.io.PET.prd.yardl_types.np.datetime64]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.datetime.date) –

Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.datetime64) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.datetime.date

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.datetime64

pytomography.io.PET.prd._binary.date_serializer[source]#
pytomography.io.PET.prd._binary.TIMEDELTA_NANOSECONDS_DTYPE[source]#
class pytomography.io.PET.prd._binary.TimeSerializer[source]#

Bases: TypeSerializer[pytomography.io.PET.prd.yardl_types.Time, pytomography.io.PET.prd.yardl_types.np.timedelta64]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.timedelta64) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.Time

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.timedelta64

pytomography.io.PET.prd._binary.time_serializer[source]#
pytomography.io.PET.prd._binary.DATETIME_NANOSECONDS_DTYPE[source]#
pytomography.io.PET.prd._binary.EPOCH_DATETIME[source]#
class pytomography.io.PET.prd._binary.DateTimeSerializer[source]#

Bases: TypeSerializer[pytomography.io.PET.prd.yardl_types.DateTime, pytomography.io.PET.prd.yardl_types.np.datetime64]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.datetime64) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.DateTime

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.datetime64

pytomography.io.PET.prd._binary.datetime_serializer[source]#
class pytomography.io.PET.prd._binary.NoneSerializer[source]#

Bases: TypeSerializer[None, Any]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

None

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

Any

pytomography.io.PET.prd._binary.none_serializer[source]#
pytomography.io.PET.prd._binary.TEnum[source]#
class pytomography.io.PET.prd._binary.EnumSerializer(integer_serializer, enum_type)[source]#

Bases: pytomography.io.PET.prd.yardl_types.Generic[TEnum, T, T_NP], TypeSerializer[TEnum, T_NP]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:
  • integer_serializer (TypeSerializer[T, T_NP]) –

  • enum_type (type) –

write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

TEnum

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

T_NP

is_trivially_serializable()[source]#
Return type:

bool

class pytomography.io.PET.prd._binary.OptionalSerializer(element_serializer)[source]#

Bases: pytomography.io.PET.prd.yardl_types.Generic[T, T_NP], TypeSerializer[Optional[T], pytomography.io.PET.prd.yardl_types.np.void]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:

element_serializer (TypeSerializer[T, T_NP]) –

write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.void) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

Optional[T]

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.void

is_trivially_serializable()[source]#
Return type:

bool

class pytomography.io.PET.prd._binary.UnionCaseProtocol[source]#

Bases: Protocol

Base class for protocol classes.

Protocol classes are defined as:

class Proto(Protocol):
    def meth(self) -> int:
        ...

Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example:

class C:
    def meth(self) -> int:
        return 0

def func(x: Proto) -> int:
    return x.meth()

func(C())  # Passes static type check

See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:

class GenProto(Protocol[T]):
    def meth(self) -> T:
        ...
index: int[source]#
value: Any[source]#
class pytomography.io.PET.prd._binary.UnionSerializer(union_type, cases)[source]#

Bases: TypeSerializer[T, pytomography.io.PET.prd.yardl_types.np.object_]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:
  • union_type (type) –

  • cases (list[Optional[tuple[type, TypeSerializer[Any, Any]]]]) –

write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.object_) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

T

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.object_

class pytomography.io.PET.prd._binary.StreamSerializer(element_serializer)[source]#

Bases: TypeSerializer[Iterable[T], Any]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:

element_serializer (TypeSerializer[T, T_NP]) –

write(stream, value)[source]#
Parameters:
Return type:

None

abstract write_numpy(stream, value)[source]#
Parameters:
Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

Iterable[T]

abstract read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.object_

class pytomography.io.PET.prd._binary.FixedVectorSerializer(element_serializer, length)[source]#

Bases: pytomography.io.PET.prd.yardl_types.Generic[T, T_NP], TypeSerializer[list[T], pytomography.io.PET.prd.yardl_types.np.object_]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:
write(stream, value)[source]#
Parameters:
Return type:

None

abstract write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.object_) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

list[T]

abstract read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.object_

is_trivially_serializable()[source]#
Return type:

bool

class pytomography.io.PET.prd._binary.VectorSerializer(element_serializer)[source]#

Bases: pytomography.io.PET.prd.yardl_types.Generic[T, T_NP], TypeSerializer[list[T], pytomography.io.PET.prd.yardl_types.np.object_]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:

element_serializer (TypeSerializer[T, T_NP]) –

write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.object_) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

list[T]

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.object_

pytomography.io.PET.prd._binary.TKey[source]#
pytomography.io.PET.prd._binary.TKey_NP[source]#
pytomography.io.PET.prd._binary.TValue[source]#
pytomography.io.PET.prd._binary.TValue_NP[source]#
class pytomography.io.PET.prd._binary.MapSerializer(key_serializer, value_serializer)[source]#

Bases: pytomography.io.PET.prd.yardl_types.Generic[TKey, TKey_NP, TValue, TValue_NP], TypeSerializer[dict[TKey, TValue], pytomography.io.PET.prd.yardl_types.np.object_]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:
write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.object_) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

dict[TKey, TValue]

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.object_

class pytomography.io.PET.prd._binary.NDArraySerializerBase(overall_dtype, element_serializer, dtype)[source]#

Bases: pytomography.io.PET.prd.yardl_types.Generic[T, T_NP], TypeSerializer[numpy.typing.NDArray[Any], pytomography.io.PET.prd.yardl_types.np.object_]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:
  • overall_dtype (numpy.typing.DTypeLike) –

  • element_serializer (TypeSerializer[T, T_NP]) –

  • dtype (numpy.typing.DTypeLike) –

static _get_dtype_and_subarray_shape(dtype)[source]#
Parameters:

dtype (pytomography.io.PET.prd.yardl_types.np.dtype[Any]) –

Return type:

tuple[pytomography.io.PET.prd.yardl_types.np.dtype[Any], tuple[int, Ellipsis]]

_write_data(stream, value)[source]#
Parameters:
Return type:

None

_read_data(stream, shape)[source]#
Parameters:
Return type:

numpy.typing.NDArray[Any]

_is_current_array_trivially_serializable(value)[source]#
Parameters:

value (numpy.typing.NDArray[Any]) –

Return type:

bool

class pytomography.io.PET.prd._binary.DynamicNDArraySerializer(element_serializer)[source]#

Bases: NDArraySerializerBase[T, T_NP]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:

element_serializer (TypeSerializer[T, T_NP]) –

write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.object_) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

numpy.typing.NDArray[Any]

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.object_

class pytomography.io.PET.prd._binary.NDArraySerializer(element_serializer, ndims)[source]#

Bases: pytomography.io.PET.prd.yardl_types.Generic[T, T_NP], NDArraySerializerBase[T, T_NP]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:
write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.object_) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

numpy.typing.NDArray[Any]

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.object_

class pytomography.io.PET.prd._binary.FixedNDArraySerializer(element_serializer, shape)[source]#

Bases: pytomography.io.PET.prd.yardl_types.Generic[T, T_NP], NDArraySerializerBase[T, T_NP]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:
  • element_serializer (TypeSerializer[T, T_NP]) –

  • shape (tuple[int, Ellipsis]) –

write(stream, value)[source]#
Parameters:
Return type:

None

write_numpy(stream, value)[source]#
Parameters:
  • stream (CodedOutputStream) –

  • value (pytomography.io.PET.prd.yardl_types.np.object_) –

Return type:

None

read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

numpy.typing.NDArray[Any]

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.object_

is_trivially_serializable()[source]#
Return type:

bool

class pytomography.io.PET.prd._binary.RecordSerializer(field_serializers)[source]#

Bases: TypeSerializer[T, pytomography.io.PET.prd.yardl_types.np.void]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
Parameters:

field_serializers (list[Tuple[str, TypeSerializer[Any, Any]]]) –

is_trivially_serializable()[source]#
Return type:

bool

_write(stream, *values)[source]#
Parameters:
Return type:

None

_read(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

tuple[Any, Ellipsis]

read_numpy(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

pytomography.io.PET.prd.yardl_types.np.void

pytomography.io.PET.prd._binary.int32_struct[source]#
pytomography.io.PET.prd._binary.write_fixed_int32(stream, value)[source]#
Parameters:
Return type:

None

pytomography.io.PET.prd._binary.read_fixed_int32(stream)[source]#
Parameters:

stream (CodedInputStream) –

Return type:

int