mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-08 03:22:38 +02:00
[kernel slicing] active_dims can be a single integer now
This commit is contained in:
parent
536adf0782
commit
ac224c0dbd
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ class Kern(Parameterized):
|
||||||
if active_dims is None:
|
if active_dims is None:
|
||||||
active_dims = np.arange(input_dim)
|
active_dims = np.arange(input_dim)
|
||||||
|
|
||||||
self.active_dims = np.array(active_dims, dtype=int)
|
self.active_dims = np.atleast_1d(active_dims).astype(int)
|
||||||
|
|
||||||
assert self.active_dims.size == self.input_dim, "input_dim={} does not match len(active_dim)={}, active_dims={}".format(self.input_dim, self.active_dims.size, self.active_dims)
|
assert self.active_dims.size == self.input_dim, "input_dim={} does not match len(active_dim)={}, active_dims={}".format(self.input_dim, self.active_dims.size, self.active_dims)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue