DType#

flat_to_linkml = {'ascii': 'string', 'bool': 'boolean', 'double': 'double', 'float': 'float', 'float32': 'float', 'float64': 'double', 'int': 'integer', 'int16': 'integer', 'int32': 'integer', 'int64': 'integer', 'int8': 'integer', 'isodatetime': 'datetime', 'long': 'integer', 'numeric': 'float', 'short': 'integer', 'text': 'string', 'uint': 'integer', 'uint16': 'integer', 'uint32': 'integer', 'uint64': 'integer', 'uint8': 'integer', 'utf': 'string', 'utf8': 'string', 'utf_8': 'string'}#

Map between the flat data types and the simpler linkml base types

allowed_precisions = {'datetime64': ['object'], 'float': ['double'], 'float16': ['float16', 'float32', 'float64'], 'float32': ['float32', 'float64'], 'int': ['long'], 'int8': ['short', 'int', 'long', 'int16', 'int32', 'int64'], 'number': ['short', 'int', 'long', 'int16', 'int32', 'int64', 'uint', 'uint8', 'uint16', 'uint32', 'uint64', 'float', 'float16', 'float32', 'float64'], 'short': ['int', 'long'], 'uint16': ['uint16', 'uint32', 'uint64'], 'uint32': ['uint32', 'uint64'], 'uint8': ['uint8', 'uint16', 'uint32', 'uint64'], 'utf': ['ascii']}#

Following HDMF, it turns out that specifying precision actually specifies minimum precision https://github.com/hdmf-dev/hdmf/blob/ddc842b5c81d96e0b957b96e88533b16c137e206/src/hdmf/validate/validator.py#L22 https://github.com/hdmf-dev/hdmf/blob/ddc842b5c81d96e0b957b96e88533b16c137e206/src/hdmf/spec/spec.py#L694-L714