Create a `Col` definition from a NumPy scalar type `sctype`. Optional shape, default value and position may be specified as the `shape`, `dflt` and `pos` arguments, respectively. Information in the `sctype` not represented in a `Col` is ignored.
(
cls,
sctype: str | np.dtype,
shape: tuple[int, ...] = (),
dflt: Any | None = None,
pos: int | None = None,
)
| 107 | |
| 108 | @classmethod |
| 109 | def from_sctype( |
| 110 | cls, |
| 111 | sctype: str | np.dtype, |
| 112 | shape: tuple[int, ...] = (), |
| 113 | dflt: Any | None = None, |
| 114 | pos: int | None = None, |
| 115 | ) -> Col: |
| 116 | """Create a `Col` definition from a NumPy scalar type `sctype`. |
| 117 | |
| 118 | Optional shape, default value and position may be specified as |
| 119 | the `shape`, `dflt` and `pos` arguments, respectively. |
| 120 | Information in the `sctype` not represented in a `Col` is |
| 121 | ignored. |
| 122 | |
| 123 | """ |
| 124 | newatom = atom.Atom.from_sctype(sctype, shape, dflt) |
| 125 | return cls.from_atom(newatom, pos=pos) |
| 126 | |
| 127 | @classmethod |
| 128 | def from_dtype( |