Skip to content

Commit

Permalink
Removing the global dependency on matplotlib
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperSnoek committed Oct 21, 2013
1 parent ba912eb commit 0d3b3ae
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spearmint/spearmint/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
import scipy.optimize as spo
import scipy.io as sio
import scipy.weave
try:
import matplotlib.pyplot as plt
except:
pass

SQRT_3 = np.sqrt(3.0)
SQRT_5 = np.sqrt(5.0)
Expand Down Expand Up @@ -296,6 +292,11 @@ def grad_nlogprob(hypers):
self.ls = np.exp(hypers[2:])

def main():
try:
import matplotlib.pyplot as plt
except:
pass

# Let's start with some random values
x = np.linspace(0,1,10)[:,np.newaxis]*10#np.random.rand(100)[:,np.newaxis]
y = np.random.randn(10)
Expand Down

0 comments on commit 0d3b3ae

Please sign in to comment.