Datatypes

Model input and outputs are described in model YAML files by several properties, including type. The type assigned to an input/output determines how yggdrasil will serialize data that is passed to/from the input/output from/to other models and how data objects are mapped between native data types in the different programming languages (see here for the mappings). Simple types (e.g. float, int) can be specified by strings, while more complex datatypes can be described directly in the YAML file using a JSON Schema (See below). When the YAML specification files are read in these datatypes are validated against the yggdrasil metaschema.

Primary Datatypes

yggdrasil supports all of the following basic data types which include the core JSON data types, as well as several additional datatypes that yggdrasil defines for convenience. Simple datatypes can be specified via strings, while collection datatypes require a schema that can be used to validate data being passed (dynamic arrays/objects are not yet supported).

Simple Datatypes

Type

========-

boolean

Description

-=================================================================================

true or false

integer

Integer numbers

null

number

Integer or decimal numbers

string

Arrays of characters

Collection Datatypes

Type

=======-

array

Description

-=================================================================================

Container for sequences of values

object

Container for mappings of key and value pairs

yggdrasil Datatypes

Type

=========-

class

Description

-=================================================================================

Python class

function

Python function

instance

Python class instance

ndarray

N-dimensional arrays of memory contiguous arrays of scalars

obj

ObjWavefront 3D structure

ply

Ply 3D structure

scalar

Scalar quantities that can have units, variables precision, or an encoding (for unicode scalars)

schema

JSON schema

Information on adding new datatypes can be found here