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

Method from_dtype

tables/description.py:128–145  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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(

Callers 1

descr_from_dtypeFunction · 0.45

Calls 1

from_atomMethod · 0.80

Tested by

no test coverage detected