mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-05 14:55:15 +02:00
Fixed copy bug of observable array
This commit is contained in:
parent
835934ff51
commit
610dbed38a
1 changed files with 3 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ class ParamList(list):
|
||||||
if el is other:
|
if el is other:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
pass
|
pass
|
||||||
class C(np.ndarray):
|
class C(np.ndarray):
|
||||||
__array_priority__ = 1.
|
__array_priority__ = 1.
|
||||||
|
|
@ -80,8 +80,8 @@ class ObservableArray(ListArray, Observable):
|
||||||
def __getslice__(self, start, stop):
|
def __getslice__(self, start, stop):
|
||||||
return self.__getitem__(slice(start, stop))
|
return self.__getitem__(slice(start, stop))
|
||||||
def __setslice__(self, start, stop, val):
|
def __setslice__(self, start, stop, val):
|
||||||
return self.__setitem__(slice(start, stop), val)
|
return self.__setitem__(slice(start, stop), val)
|
||||||
def __copy__(self, *args):
|
def __copy__(self, *args):
|
||||||
return ObservableArray(self.base.base.copy(*args))
|
return ObservableArray(self.view(np.ndarray).copy())
|
||||||
def copy(self, *args):
|
def copy(self, *args):
|
||||||
return self.__copy__(*args)
|
return self.__copy__(*args)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue