Skip to content

Commit 5a2e520

Browse files
authored
Include uint data types. (#836)
1 parent 4daf037 commit 5a2e520

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

python/mlcroissant/mlcroissant/_src/core/constants.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ class DataType:
242242
INT16 = ML_COMMONS_V_1_0.Int16
243243
INT32 = ML_COMMONS_V_1_0.Int32
244244
INT64 = ML_COMMONS_V_1_0.Int64
245+
UINT8 = ML_COMMONS_V_1_0.UInt8
246+
UINT16 = ML_COMMONS_V_1_0.UInt16
247+
UINT32 = ML_COMMONS_V_1_0.UInt32
248+
UINT64 = ML_COMMONS_V_1_0.UInt64
245249
SPLIT = ML_COMMONS_V_1_0.Split
246250
TEXT = namespace.SDO.Text
247251
URL = namespace.SDO.URL

python/mlcroissant/mlcroissant/_src/core/data_types.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ def check_expected_type(issues: Issues, jsonld: Json, expected_type: str):
3636
DataType.INT64: np.int64,
3737
DataType.TEXT: bytes,
3838
DataType.URL: bytes,
39+
DataType.UINT8: np.uint8,
40+
DataType.UINT16: np.uint16,
41+
DataType.UINT32: np.uint32,
42+
DataType.UINT64: np.uint64,
3943
}
4044

4145

0 commit comments

Comments
 (0)