From 4ba928082f4e60ae34c6b5e04313469ac6403fd9 Mon Sep 17 00:00:00 2001 From: James Hensman Date: Tue, 28 Apr 2015 16:04:02 +0100 Subject: [PATCH] all tests passing --- GPy/util/misc.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/GPy/util/misc.py b/GPy/util/misc.py index 4e96dd47..8bef929c 100644 --- a/GPy/util/misc.py +++ b/GPy/util/misc.py @@ -42,9 +42,6 @@ def chain_1(df_dg, dg_dx): """ if np.all(dg_dx==1.): return df_dg - if len(df_dg) > 1 and len(df_dg.shape)>1 and df_dg.shape[-1] > 1: - #import ipdb; ipdb.set_trace() # XXX BREAKPOINT - raise NotImplementedError('Not implemented for matricies yet') return df_dg * dg_dx def chain_2(d2f_dg2, dg_dx, df_dg, d2g_dx2): @@ -56,8 +53,6 @@ def chain_2(d2f_dg2, dg_dx, df_dg, d2g_dx2): """ if np.all(dg_dx==1.) and np.all(d2g_dx2 == 0): return d2f_dg2 - if len(d2f_dg2) > 1 and len(d2f_dg2.shape)>1 and d2f_dg2.shape[-1] > 1: - raise NotImplementedError('Not implemented for matricies yet') dg_dx_2 = np.clip(dg_dx, -np.inf, _lim_val_square)**2 #dg_dx_2 = dg_dx**2 return d2f_dg2*(dg_dx_2) + df_dg*d2g_dx2 @@ -71,11 +66,7 @@ def chain_3(d3f_dg3, dg_dx, d2f_dg2, d2g_dx2, df_dg, d3g_dx3): """ if np.all(dg_dx==1.) and np.all(d2g_dx2==0) and np.all(d3g_dx3==0): return d3f_dg3 - if ( (len(d2f_dg2) > 1 and d2f_dg2.shape[-1] > 1) - or (len(d3f_dg3) > 1 and d3f_dg3.shape[-1] > 1)): - raise NotImplementedError('Not implemented for matricies yet') dg_dx_3 = np.clip(dg_dx, -np.inf, _lim_val_cube)**3 - #dg_dx_3 = dg_dx**3 return d3f_dg3*(dg_dx_3) + 3*d2f_dg2*dg_dx*d2g_dx2 + df_dg*d3g_dx3 def opt_wrapper(m, **kwargs):