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

Method from_kind

tables/description.py:165–182  ·  view source on GitHub ↗

Create a `Col` definition from a PyTables `kind`. Optional item size, shape, default value and position may be specified as the `itemsize`, `shape`, `dflt` and `pos` arguments, respectively. Bear in mind that not all columns support a default item size.

(
        cls,
        kind,
        itemsize=None,
        shape: tuple[int, ...] = (),
        dflt: Any | None = None,
        pos: int | None = None,
    )

Source from the content-addressed store, hash-verified

163
164 @classmethod
165 def from_kind(
166 cls,
167 kind,
168 itemsize=None,
169 shape: tuple[int, ...] = (),
170 dflt: Any | None = None,
171 pos: int | None = None,
172 ) -> Col:
173 """Create a `Col` definition from a PyTables `kind`.
174
175 Optional item size, shape, default value and position may be
176 specified as the `itemsize`, `shape`, `dflt` and `pos`
177 arguments, respectively. Bear in mind that not all columns
178 support a default item size.
179
180 """
181 newatom = atom.Atom.from_kind(kind, itemsize, shape, dflt)
182 return cls.from_atom(newatom, pos=pos)
183
184 @classmethod
185 def _subclass_from_prefix(cls, prefix: str) -> type[Col]:

Callers 4

TestClass · 0.45
LInfoClass · 0.45
LInfo2Class · 0.45
LInfo3Class · 0.45

Calls 1

from_atomMethod · 0.80

Tested by

no test coverage detected