RCAIDE.Framework.Core.Data
Data#
- dictgetitem(self, key, /)#
Return self[key].
- objgetattrib(self, name, /)#
Return getattr(self, name).
- class Data(*args, **kwarg)[source]#
Bases:
dict
An extension of the Python dict which allows for both tag and ‘.’ usage. This is an unordered dictionary. So indexing it will not produce deterministic results. This has less overhead than ordering. If ordering is needed use DataOrdered().
Assumptions: N/A
Source: N/A
- typestring()[source]#
This function makes the .key.key structure in string form of Data()
Assumptions: N/A
Source: N/A
Inputs: N/A
Outputs: N/A
Properties Used: N/A
- dataname()[source]#
This function is used for printing the class
Assumptions: N/A
Source: N/A
Inputs: N/A
Outputs: N/A
Properties Used: N/A
- get_bases()[source]#
Finds the higher classes that may be built off of data
Assumptions: N/A
Source: N/A
Inputs: N/A
Outputs: klasses
Properties Used: N/A
- append(value, key=None)[source]#
Adds new values to the classes. Can also change an already appended key
Assumptions: N/A
Source: N/A
Inputs: value key
Outputs: N/A
Properties Used: N/A
- deep_set(keys, val)[source]#
Regresses through a list of keys the same value in various places in a dictionary.
Assumptions: N/A
Source: N/A
Inputs: keys - The keys to iterate over val - The value to be set
Outputs: N/A
Properties Used: N/A
- deep_get(keys)[source]#
Regresses through a list of keys to pull a specific value out
Assumptions: N/A
Source: N/A
Inputs: keys - The keys to iterate over
Outputs: value - The value to be retrieved
Properties Used: N/A
- pack_array(output='vector')[source]#
maps the data dict to a 1D vector or 2D column array
- Assumptions:
will only pack int, float, np.array and np.matrix (max rank 2) if using output = ‘matrix’, all data values must have same length (if 1D) or number of rows (if 2D), otherwise is skipped
Source: N/A
- Inputs:
- output - either ‘vector’ (default), or ‘array’
chooses whether to output a 1d vector or 2d column array
- Outputs:
array - the packed array
Properties Used: N/A
- unpack_array(M)[source]#
unpacks an input 1d vector or 2d column array into the data dictionary important that the structure of the data dictionary, and the shapes of the contained values are the same as the data from which the array was packed
Assumptions: N/A
Source: N/A
Inputs: M - either a 1D vector or 2D column array
Outputs: a reference to self, updates self in place
Properties Used: N/A