MCPcopy Create free account
hub / github.com/microsoft/BitNet / DataType

Class DataType

utils/convert.py:58–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57@dataclass(frozen=True)
58class DataType:
59 name: str
60 dtype: np.dtype[Any]
61 valid_conversions: list[str]
62
63 def elements_to_bytes(self, n_elements: int) -> int:
64 return n_elements * self.dtype.itemsize
65
66
67@dataclass(frozen=True)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected