From e0d7de9b3b095515df33c2e0bdb6aedf3f3150f6 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Mon, 14 Oct 2013 17:58:37 +0100 Subject: [PATCH] indexing fixed, some equality testing --- GPy/core/index_operations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPy/core/index_operations.py b/GPy/core/index_operations.py index 9d83fa35..63856a6d 100644 --- a/GPy/core/index_operations.py +++ b/GPy/core/index_operations.py @@ -48,7 +48,7 @@ class ConstraintIndexOperations(object): self._properties[prop] = combine_indices(self._properties[prop], ind) return 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) return self._properties[prop] = ind @@ -65,7 +65,7 @@ class ConstraintIndexOperations(object): return removed.astype(int) else: 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) diff = remove_indices(self[a], ind) removed = numpy.intersect1d(self[a], ind, True)