pactools.MultipleArray

class pactools.MultipleArray(*signals)[source]

Store a list of arrays into a single object and handle indexing for them

This is to be used as X in GridSearchCV(DARSklearn()).fit(X) Some of the arrays can be None.

Parameters
*signalsseveral ndarray or None

Stored signals

Examples

>>> import numpy as np
>>> from pactools.grid_search import MultipleArray
>>> ma = MultipleArray(np.ones(3, 10), None, None, np.zeros(3, 10, 2))
>>> print(ma)
>>> print(ma[1:])
>>> from sklearn.model_selection import GridSearchCV
>>> from pactools.grid_search import DARSklearn
>>> model = DARSklearn(fs=fs)
>>> param_grid = {'ordar': [10, 20, 30], 'ordriv': [0, 1, 2]}
>>> gscv = GridSearchCV(model, param_grid=param_grid)
>>> X = MultipleArray(sigin, sigdriv, sigdriv_imag)
>>> gscv.fit(X)
__init__(self, \*signals)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self, \*signals)

Initialize self.

take(self, \*args, \*\*kwargs)

to_list(self)

Attributes

shape

Only return the shape of the first array

Examples using pactools.MultipleArray