Tables¶
-
class
Tables
(*args, **kwargs)[source]¶ Tables component of geological model.
-
apply
(func, attr, *args, inplace=False, **kwargs)[source]¶ Apply function to attributes.
- Parameters
func (callable) – A function to apply. Must accept data as its first argument.
attr (str, array-like) – Attributes to get data from.
args (misc) – Any additional positional arguments to
func
.kwargs (misc) – Any additional named arguments to
func
.
- Returns
output – Transformed component.
- Return type
-
property
attributes
¶ Array of attributes.
-
property
class_name
¶ Name of the component.
-
copy
()¶ Returns a deepcopy of attributes. Cached properties are not copied.
-
del_state
(*args)¶ State remover.
-
drop
(attr)¶ Drop an attribute.
-
dump
(path, **kwargs)¶ Dump attributes into file.
- Parameters
- Returns
comp – BaseComponent unchanged.
- Return type
-
static
dump_array_ascii
(buffer, array, header=None, fmt='%f', compressed=True)¶ Writes array-like data into an ASCII buffer.
- Parameters
-
empty_like
()¶ Get an empty component with the same state and the structure of embedded BaseComponents (if any).
-
init_state
(**kwargs)¶ Init state attributes.
-
items
()¶ Returns pairs of attribute’s names and data.
-
keys
()¶ Array of attributes.
-
load
(path_or_buffer, **kwargs)¶ Load data from a file or buffer.
- Parameters
path_or_buffer (str of string buffer) – Source to read data from.
**kwargs (dict, optional) – Any kwargs to be passed to load method.
- Returns
comp – BaseComponent with loaded attributes.
- Return type
-
pvtg_to_pvdg
(as_saturated=False, inplace=True)[source]¶ Transforms PVTG (wet gas) table into PVDG (dry gas) form.
- Parameters
- Returns
pvdg
- Return type
_Table or None
-
ravel
(attr=None, order='F', inplace=True)¶ Ravel attributes where applicable assuming by default Fortran order.
-
reshape
(attr, newshape, order='C', inplace=True)¶ Reshape numpy.ndarray attributes.
- Parameters
- Returns
output
- Return type
BaseComponent if inplace else reshaped attribute itself.
-
set_state
(**kwargs)¶ State setter.
-
property
state
¶ Get state.
-
values
()¶ Returns a generator of attribute’s data.
-