MCPcopy Create free account
hub / github.com/PyTables/PyTables / __init__

Function __init__

tables/atom.py:615–629  ·  view source on GitHub ↗
(  # noqa: N807
        self: Atom,
        itemsize: int | None = defitemsize,
        shape: Shape = (),
        dflt: Any = defvalue,
    )

Source from the content-addressed store, hash-verified

613 defitemsize = split_type(deftype)[1]
614
615 def __init__( # noqa: N807
616 self: Atom,
617 itemsize: int | None = defitemsize,
618 shape: Shape = (),
619 dflt: Any = defvalue,
620 ) -> None:
621 assert self.kind in atom_map
622 try:
623 atomclass = atom_map[self.kind][itemsize]
624 except KeyError:
625 raise _invalid_itemsize_error(
626 self.kind, itemsize, atom_map[self.kind]
627 )
628 self.__class__ = atomclass
629 atomclass.__init__(self, shape, dflt)
630
631 return __init__
632

Callers

nothing calls this directly

Calls 2

_invalid_itemsize_errorFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected