mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-10 20:42:39 +02:00
[Kern] added assertion for inputs X being matrix (ndim == 2)
This commit is contained in:
parent
541aa1c8b6
commit
58097a5241
1 changed files with 1 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ class KernCallsViaSlicerMeta(ParametersChangedMeta):
|
||||||
|
|
||||||
class _Slice_wrap(object):
|
class _Slice_wrap(object):
|
||||||
def __init__(self, k, X, X2=None):
|
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.k = k
|
||||||
self.shape = X.shape
|
self.shape = X.shape
|
||||||
if (self.k.active_dims is not None) and (self.k._sliced_X == 0):
|
if (self.k.active_dims is not None) and (self.k._sliced_X == 0):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue