From 5f229aae2ef5bf698174b86aafdc3f049ed8cc65 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Fri, 14 Mar 2014 11:31:41 +0000 Subject: [PATCH] active dim indices and slices --- GPy/kern/_src/kern.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/GPy/kern/_src/kern.py b/GPy/kern/_src/kern.py index 3efe7f5f..5924d250 100644 --- a/GPy/kern/_src/kern.py +++ b/GPy/kern/_src/kern.py @@ -213,9 +213,6 @@ class CombinationKernel(Kern): :param array-like|slice extra_dims: if needed extra dimensions for the combination kernel to work on """ assert all([isinstance(k, Kern) for k in kernels]) - import itertools - # make sure the active dimensions of all underlying kernels are covered: - #ma = reduce(lambda a,b: max(a, b.stop if isinstance(b, slice) else max(b)), itertools.chain((x.active_dims for x in kernels)), 0) active_dims = reduce(np.union1d, (np.r_[x.active_dims] for x in kernels), np.array([], dtype=int)) input_dim = active_dims.max()+1 + len(extra_dims) active_dims = slice(active_dims.max()+1+len(extra_dims))