Python 3 fixes

This commit is contained in:
Mike Croucher 2015-09-07 15:18:45 +01:00
parent 2f0d3b5dcd
commit ec7334846c
3 changed files with 8 additions and 7 deletions

View file

@ -40,7 +40,7 @@ class SparseGPMissing(StochasticStorage):
bdict = {}
#For N > 1000 array2string default crops
opt = np.get_printoptions()
np.set_printoptions(threshold='nan')
np.set_printoptions(threshold=np.inf)
for d in range(self.Y.shape[1]):
inan = np.isnan(self.Y)[:, d]
arr_str = np.array2string(inan, np.inf, 0, True, '', formatter={'bool':lambda x: '1' if x else '0'})
@ -74,7 +74,7 @@ class SparseGPStochastics(StochasticStorage):
bdict = {}
if self.missing_data:
opt = np.get_printoptions()
np.set_printoptions(threshold='nan')
np.set_printoptions(threshold=np.inf)
for d in self.d:
inan = np.isnan(self.Y[:, d])
arr_str = np.array2string(inan,np.inf, 0,True, '',formatter={'bool':lambda x: '1' if x else '0'})