def _preprocess_data(self, data):
"""Converts the data array to the preferred dim x #points structure.
Parameters
----------
data : :obj:`numpy.ndarray` of float
The data to process.
Returns
-------
:obj:`numpy.ndarray` of float
The same data array, but reshapes lists to be dim x 1.
"""
if len(data.shape) == 1:
data = data[:,np.newaxis]
return data
评论列表
文章目录