mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-13 14:03:20 +02:00
[params] indexing with boolean arrays switched off, rases proper error now
This commit is contained in:
parent
c8da9602ec
commit
8531c4bff0
1 changed files with 2 additions and 0 deletions
|
|
@ -137,6 +137,8 @@ class Param(OptimizationHandlable, ObsAr):
|
||||||
slice_index = self._current_slice_
|
slice_index = self._current_slice_
|
||||||
def f(a):
|
def f(a):
|
||||||
a, b = a
|
a, b = a
|
||||||
|
if isinstance(a, numpy.ndarray) and a.dtype == bool:
|
||||||
|
raise ValueError, "Boolean indexing not implemented, use Param[np.where(index)] to index by boolean arrays!"
|
||||||
if a not in (slice(None), Ellipsis):
|
if a not in (slice(None), Ellipsis):
|
||||||
if isinstance(a, slice):
|
if isinstance(a, slice):
|
||||||
start, stop, step = a.indices(b)
|
start, stop, step = a.indices(b)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue