Create a `Col` definition from a NumPy `dtype`. Optional default value and position may be specified as the `dflt` and `pos` arguments, respectively. The `dtype` must have a byte order which is irrelevant or compatible with that of the system. Information in the `d
(
cls,
dtype,
dflt: Any | None = None,
pos: int | None = None,
_offset: int | None = None,
)
| 126 | |
| 127 | @classmethod |
| 128 | def from_dtype( |
| 129 | cls, |
| 130 | dtype, |
| 131 | dflt: Any | None = None, |
| 132 | pos: int | None = None, |
| 133 | _offset: int | None = None, |
| 134 | ) -> Col: |
| 135 | """Create a `Col` definition from a NumPy `dtype`. |
| 136 | |
| 137 | Optional default value and position may be specified as the |
| 138 | `dflt` and `pos` arguments, respectively. The `dtype` must have |
| 139 | a byte order which is irrelevant or compatible with that of the |
| 140 | system. Information in the `dtype` not represented in a `Col` |
| 141 | is ignored. |
| 142 | |
| 143 | """ |
| 144 | newatom = atom.Atom.from_dtype(dtype, dflt) |
| 145 | return cls.from_atom(newatom, pos=pos, _offset=_offset) |
| 146 | |
| 147 | @classmethod |
| 148 | def from_type( |
no test coverage detected