mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-01 15:52:39 +02:00
Updates to sympykern including bug fixes and ability to name covariance. Include test for rbf_sympy in kernel tests. Remove coregionalization test as it's causing a core dump! Need to chase this up.
This commit is contained in:
parent
527f4ca469
commit
1581f78412
6 changed files with 312 additions and 133 deletions
|
|
@ -7,9 +7,21 @@ import urllib as url
|
|||
import zipfile
|
||||
import tarfile
|
||||
import datetime
|
||||
|
||||
|
||||
ipython_notebook = False
|
||||
if ipython_notebook:
|
||||
import IPython.core.display
|
||||
def ipynb_input(varname, prompt=''):
|
||||
"""Prompt user for input and assign string val to given variable name."""
|
||||
js_code = ("""
|
||||
var value = prompt("{prompt}","");
|
||||
var py_code = "{varname} = '" + value + "'";
|
||||
IPython.notebook.kernel.execute(py_code);
|
||||
""").format(prompt=prompt, varname=varname)
|
||||
return IPython.core.display.Javascript(js_code)
|
||||
|
||||
import sys, urllib
|
||||
|
||||
def reporthook(a,b,c):
|
||||
# ',' at the end of the line is important!
|
||||
#print "% 3.1f%% of %d bytes\r" % (min(100, float(a * b) / c * 100), c),
|
||||
|
|
@ -130,14 +142,18 @@ The database was created with funding from NSF EIA-0196217.""",
|
|||
'license' : None,
|
||||
'size' : 24229368},
|
||||
}
|
||||
|
||||
|
||||
|
||||
def prompt_user():
|
||||
"""Ask user for agreeing to data set licenses."""
|
||||
# raw_input returns the empty string for "enter"
|
||||
yes = set(['yes', 'y'])
|
||||
no = set(['no','n'])
|
||||
|
||||
choice = raw_input().lower()
|
||||
choice = ''
|
||||
if ipython_notebook:
|
||||
ipynb_input(choice, prompt='provide your answer here')
|
||||
else:
|
||||
choice = raw_input().lower()
|
||||
if choice in yes:
|
||||
return True
|
||||
elif choice in no:
|
||||
|
|
@ -146,6 +162,7 @@ def prompt_user():
|
|||
sys.stdout.write("Please respond with 'yes', 'y' or 'no', 'n'")
|
||||
return prompt_user()
|
||||
|
||||
|
||||
def data_available(dataset_name=None):
|
||||
"""Check if the data set is available on the local machine already."""
|
||||
for file_list in data_resources[dataset_name]['files']:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue