From 4642f5ac2b4a044d78ab4e55ff15107b892945f2 Mon Sep 17 00:00:00 2001 From: Mike Croucher Date: Tue, 3 Mar 2015 17:54:05 +0000 Subject: [PATCH] types.TupleType -> tuple fix for python 3 --- GPy/util/linalg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GPy/util/linalg.py b/GPy/util/linalg.py index 7f1a28f3..ec66cc09 100644 --- a/GPy/util/linalg.py +++ b/GPy/util/linalg.py @@ -214,12 +214,12 @@ def mdot(*args): def _mdot_r(a, b): """Recursive helper for mdot""" - if type(a) == types.TupleType: + if type(a) == tuple: if len(a) > 1: a = mdot(*a) else: a = a[0] - if type(b) == types.TupleType: + if type(b) == tuple: if len(b) > 1: b = mdot(*b) else: @@ -362,7 +362,7 @@ def tdot_blas(mat, out=None): A = mat.ctypes.data_as(ctypes.c_void_p) BETA = c_double(0.0) C = out.ctypes.data_as(ctypes.c_void_p) - LDC = c_int(np.max(out.strides) // 8) + LDC = c_int(np.max(out.strides) / 8) dsyrk(byref(UPLO), byref(TRANS), byref(N), byref(K), byref(ALPHA), A, byref(LDA), byref(BETA), C, byref(LDC))