def ts_probs(dset, bins=None, axis=0, dim=None, layer=None,
log_counts=False, log_probs=False, names=None,
keep_attrs=True, chunks=None):
'''Fixed or unevenly spaced histogram binning for
the time dimension of a 3-D cube DataArray in X
Parameters:
dset: MLDataset
axis: Integer like 0, 1, 2 to indicate which is the time axis of cube
layer: The name of the DataArray in MLDataset to run scipy.describe on
bins: Passed to np.histogram
log_probs: Return probabilities associated with log counts? True / False
'''
layer = _validate_layer(dset, layer)
def each_arr(arr, layer):
return resize_each_1d_slice(arr, _hist_1d, bins=bins,
axis=axis, dim=dim, layer=layer,
log_counts=log_counts,
log_probs=log_probs,
names=names,
keep_attrs=keep_attrs,
chunks=chunks)
return concat_ml_features(*(each_arr(dset[_], layer) for _ in layer))
评论列表
文章目录