kappa_sdk.Vector#
- class kappa_sdk.Vector(dates, values, first_x=None, vector_id=None)[source]#
Vector object.
Container of the data that supports:
Conversion of X values between the absolute and elapsed times.
Conversion of Y values from the internal units to the given ones.
Important
When initializing the
Vector
, Y values must be given ininternal units
. This conversion can be done with the help of theUnitConverter
.- Parameters:
dates (List[datetime]) – List of X (date) values.
values (List[float]) – List of Y (data) values.
first_x (Optional[datetime]) – first_x of a step data
vector_id (Optional[str])
Attributes
Vector.dates
List of X (date) values in this
Vector
.Vector.elapsed_times
List of X (date) values as elapsed time (in hours), counted from the first date in the
Vector
.Vector.first_x
Gets the first_x/ start time of the elapsed times of this
Vector
Vector.id
Gets the
Vector
id.Vector.values
List of Y (data) values in this
Vector
.Methods
Vector.set_elapsed_times
(elapsed_times[, ...])Sets the elapsed times.
Vector.set_first_x
(first_x)