mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-12 05:22:38 +02:00
convenience change in linear.py
This commit is contained in:
parent
d2aeb6461e
commit
ce5b9ee81a
1 changed files with 3 additions and 0 deletions
|
|
@ -28,6 +28,9 @@ class linear(kernpart):
|
|||
self.Nparam = 1
|
||||
self.name = 'linear'
|
||||
if variances is not None:
|
||||
if isinstance(variances, float):
|
||||
variances = np.array([variances])
|
||||
|
||||
assert variances.shape == (1,)
|
||||
else:
|
||||
variances = np.ones(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue