datasim.NPData¶
- class datasim.NPData(world, data: ~numpy.ndarray, plot_options: ~datasim.types.PlotOptions = <datasim.types.PlotOptions object>)¶
Data with Numpy array as source.
- __init__(world, data: ~numpy.ndarray, plot_options: ~datasim.types.PlotOptions = <datasim.types.PlotOptions object>)¶
Create a data source from a Numpy array.
- Parameters:
world – The World this data belongs to.
data (
np.ndarray
) – Array of data points. Shape should correspond to the dimensions of the plot (2 columns for 2D plots, 3 columns for 3D plots).plot_options (Optional[PlotOptions], optional) – Options for a plot. Defaults to default PlotOptions which means nothing will be plotted.
- Raises:
TypeError – When trying to take from a capacity resource without specifying an amount.
Methods
__init__
(world, data[, plot_options])Create a data source from a Numpy array.
Attributes
dataset
set_index
data
world
options