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,
)
| 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( |