SDF.data_model.array_data_1d module

class ArrayData1D(data: numpy.ndarray, try_hex_transformation: bool = False)[source]

Bases: SDF.data_model.abstract.Data

Wraps a 1-dimensional Numpy ndarray, represents SDF <data> tags of dataset type ‘sc’

property data

The wrapped array

static from_linearly_transformed_array(array: numpy.ndarray, multiplier: float, offset: float)SDF.data_model.array_data_1d.ArrayData1D[source]

Instantiate from a non-negative integer array with multiplier and offset

classmethod from_xml_element(element: xml.etree.ElementTree.Element)SDF.data_model.array_data_1d.ArrayData1D[source]

Generates an instance of this class from an Element

to_xml_element()xml.etree.ElementTree.Element[source]

Returns an Element object that contains all information needed to export this object as XML.

property type_for_xml

The ‘type’ attribute the wrapping <dataset> element has to have