mushi.eta
- class eta(change_points, y)[source]
Bases:
mushi.histories.History
Demographic history \(\eta(t)\).
- Parameters
Example
>>> import mushi >>> import numpy as np
>>> eta = mushi.eta(np.array([1, 10, 100, 1000]), ... np.array([1000, 100, 100, 1000, 1000]))
Methods
Return time grid and values in each cell.
Test if time grid is the same as another instance.
Generator yielding epochs as tuples: (start_time, end_time, value)
Plot the history.
Attributes
read-only alias to
vals
attribute in base class.- property y
read-only alias to
vals
attribute in base class.
- plot(**kwargs)[source]
Plot the history.
- Parameters
t_gen – generation time in years (optional)
kwargs – key word arguments passed to plt.plot
- Return type
- arrays()
Return time grid and values in each cell.
- check_grid(other)
Test if time grid is the same as another instance.
- Parameters
other (
History
) – another History object
- epochs()
Generator yielding epochs as tuples: (start_time, end_time, value)