fips.Vector#
- class fips.Vector(data, name=None, index=None, dtype=None, copy=False)[source]#
State or observation vector composed of one or more Block objects.
A Vector organizes one or more Blocks (prior, posterior, observations, etc.) into a single hierarchical structure.
Vectors are used to represent the full state or observation space and are the 1D matrix components in the inversion framework.
- Parameters:
data (pd.Series, Vector, Block, Sequence[Block | pd.Series], or array-like) – Data for the vector.
name (str, optional) – Name for the Vector.
index (pd.Index, optional) – Index for the Vector. If None, uses data.index. Index must have a ‘block’ level if data is a Series.
dtype (dtype, optional) – Data type to force.
copy (bool, default False) – Whether to copy the underlying data.
Attributes
Accessor for retrieving Block instances from the Vector.
Return the index of the underlying data.
The name of the underlying Series.
Return the shape of the underlying data.
Return the values as a numpy array.
The underlying data, which must be numeric and non-NaN.
Methods
copy([deep])Create a copy of the structure.
from_file(path)Load object from a pickle file.
reindex(index[, columns, verify_overlap, ...])Return a new instance with data reindexed to the specified index and columns.
round_index(decimals[, axis, inplace])Round float indices on the specified axis to given decimals.
to_file(path)Save object to a pickle file.
to_numpy()Get the underlying data as a NumPy array.
Get the underlying Series data.
Convert the Vector to xarray.
xs(key[, axis, level, drop_level])Cross-select data based on index/column values.