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

Method from_type

tables/description.py:148–162  ·  view source on GitHub ↗

Create a `Col` definition from a PyTables `type`. Optional shape, default value and position may be specified as the `shape`, `dflt` and `pos` arguments, respectively.

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

Source from the content-addressed store, hash-verified

146
147 @classmethod
148 def from_type(
149 cls,
150 type_,
151 shape: tuple[int, ...] = (),
152 dflt: Any | None = None,
153 pos: int | None = None,
154 ) -> Col:
155 """Create a `Col` definition from a PyTables `type`.
156
157 Optional shape, default value and position may be specified as
158 the `shape`, `dflt` and `pos` arguments, respectively.
159
160 """
161 newatom = atom.Atom.from_type(type_, shape, dflt)
162 return cls.from_atom(newatom, pos=pos)
163
164 @classmethod
165 def from_kind(

Callers 1

TestClass · 0.45

Calls 1

from_atomMethod · 0.80

Tested by

no test coverage detected