mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
has_key has been removed from Python 3
This commit is contained in:
parent
e0d0f2e633
commit
40f5f4b865
1 changed files with 3 additions and 3 deletions
|
|
@ -139,9 +139,9 @@ class Pickleable(object):
|
|||
which = self
|
||||
which.traverse_parents(parents.append) # collect parents
|
||||
for p in parents:
|
||||
if not memo.has_key(id(p)):memo[id(p)] = None # set all parents to be None, so they will not be copied
|
||||
if not memo.has_key(id(self.gradient)):memo[id(self.gradient)] = None # reset the gradient
|
||||
if not memo.has_key(id(self._fixes_)):memo[id(self._fixes_)] = None # fixes have to be reset, as this is now highest parent
|
||||
if not id(p) in memo :memo[id(p)] = None # set all parents to be None, so they will not be copied
|
||||
if not id(self.gradient) in memo:memo[id(self.gradient)] = None # reset the gradient
|
||||
if not id(self._fixes_) in memo :memo[id(self._fixes_)] = None # fixes have to be reset, as this is now highest parent
|
||||
copy = copy.deepcopy(self, memo) # and start the copy
|
||||
copy._parent_index_ = None
|
||||
copy._trigger_params_changed()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue