mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-18 13:55:14 +02:00
indexing fixed, some equality testing
This commit is contained in:
parent
41d256c984
commit
e0d7de9b3b
1 changed files with 2 additions and 2 deletions
|
|
@ -48,7 +48,7 @@ class ConstraintIndexOperations(object):
|
||||||
self._properties[prop] = combine_indices(self._properties[prop], ind)
|
self._properties[prop] = combine_indices(self._properties[prop], ind)
|
||||||
return
|
return
|
||||||
for a in self.properties():
|
for a in self.properties():
|
||||||
if numpy.all(a==prop) and a.name == prop.name and a._parent_index == prop._parent_index:
|
if numpy.all(a==prop) and a._parent_index == prop._parent_index:
|
||||||
self._properties[a] = combine_indices(self._properties[a], ind)
|
self._properties[a] = combine_indices(self._properties[a], ind)
|
||||||
return
|
return
|
||||||
self._properties[prop] = ind
|
self._properties[prop] = ind
|
||||||
|
|
@ -65,7 +65,7 @@ class ConstraintIndexOperations(object):
|
||||||
return removed.astype(int)
|
return removed.astype(int)
|
||||||
else:
|
else:
|
||||||
for a in self.properties():
|
for a in self.properties():
|
||||||
if numpy.all(a==prop) and a.name == prop.name and a._parent_index == prop._parent_index:
|
if numpy.all(a==prop) and a._parent_index == prop._parent_index:
|
||||||
ind = create_raveled_indices(indices, shape, offset)
|
ind = create_raveled_indices(indices, shape, offset)
|
||||||
diff = remove_indices(self[a], ind)
|
diff = remove_indices(self[a], ind)
|
||||||
removed = numpy.intersect1d(self[a], ind, True)
|
removed = numpy.intersect1d(self[a], ind, True)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue