[Kern] added assertion for inputs X being matrix (ndim == 2)

This commit is contained in:
Max Zwiessele 2014-04-16 10:15:33 +01:00
parent 541aa1c8b6
commit 58097a5241

View file

@ -31,6 +31,7 @@ class KernCallsViaSlicerMeta(ParametersChangedMeta):
class _Slice_wrap(object):
def __init__(self, k, X, X2=None):
assert X.ndim == 2, "only matrices are allowed as inputs to kernels for now, given X.shape={!s}".format(X.shape)
self.k = k
self.shape = X.shape
if (self.k.active_dims is not None) and (self.k._sliced_X == 0):