mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
fix the exception about _update_label_buf when copying and pickling
This commit is contained in:
parent
1a59d527a3
commit
55077161d4
1 changed files with 4 additions and 2 deletions
|
|
@ -172,7 +172,8 @@ class Parameterized(Parameterizable):
|
||||||
if not isinstance(param,Tie):
|
if not isinstance(param,Tie):
|
||||||
self._highest_parent_.ties.mergeTies(param)
|
self._highest_parent_.ties.mergeTies(param)
|
||||||
else:
|
else:
|
||||||
self._highest_parent_.ties._update_label_buf()
|
if hasattr(self._highest_parent_,'ties'):
|
||||||
|
self._highest_parent_.ties._update_label_buf()
|
||||||
else:
|
else:
|
||||||
raise HierarchyError, """Parameter exists already, try making a copy"""
|
raise HierarchyError, """Parameter exists already, try making a copy"""
|
||||||
|
|
||||||
|
|
@ -220,7 +221,8 @@ class Parameterized(Parameterizable):
|
||||||
if not isinstance(param,Tie):
|
if not isinstance(param,Tie):
|
||||||
self._highest_parent_.ties.splitTies(param)
|
self._highest_parent_.ties.splitTies(param)
|
||||||
else:
|
else:
|
||||||
self._highest_parent_.ties._update_label_buf()
|
if hasattr(self._highest_parent_,'ties'):
|
||||||
|
self._highest_parent_.ties._update_label_buf()
|
||||||
|
|
||||||
def add_parameter(self, *args, **kwargs):
|
def add_parameter(self, *args, **kwargs):
|
||||||
raise DeprecationWarning, "add_parameter was renamed to link_parameter to avoid confusion of setting variables"
|
raise DeprecationWarning, "add_parameter was renamed to link_parameter to avoid confusion of setting variables"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue