Array Types

Array classes exist allow arrays to be shared across different objects.

Array

class omf.data.Array(array=None, **kwargs)[source]

Class with unique ID and data array

Required Properties:

  • array (Array): Shared Scalar Array, a list or numpy array of <type ‘int’>, <type ‘float’>, <type ‘bool’> with shape (*) or (*, *)
  • uid (String): Unique identifier, a unicode string, Default: new instance of unicode

Other Properties:

  • datatype (dynamic StringChoice): Array data type string, any of “Int32Array”, “Int64Array”, “Uint32Array”, “BooleanArray”, “Int8Array”, “Int16Array”, “Uint8Array”, “Uint16Array”, “Float64Array”, “Uint64Array”, “Float32Array” created dynamically
  • shape (dynamic a list of Integer): Shape of the array, a list (each item is an integer) created dynamically
  • size (dynamic Integer): Size of array in bits, an integer created dynamically

StringList

class omf.data.StringList(array=None, **kwargs)[source]

Array-like class with unique ID and string-list array

Required Properties:

  • array (a list of DateTime, a list of String): List of datetimes or strings, a list (each item is a datetime object) or a list (each item is a unicode string)
  • uid (String): Unique identifier, a unicode string, Default: new instance of unicode

Other Properties:

  • datatype (dynamic StringChoice): List data type string, either “DateTimeArray” or “StringArray” created dynamically
  • shape (dynamic a list of Integer): Shape of the string list, a list (each item is an integer) created dynamically
  • size (dynamic Integer): Size of string list dumped to JSON in bits, an integer created dynamically

ArrayInstanceProperty

class omf.data.ArrayInstanceProperty(doc, **kwargs)[source]

Instance property for OMF Array objects

This adds additional shape and dtype validation.