Skip to content

Commit

Permalink
Wrapped default_t_gam_fun in a function to make it picklable
Browse files Browse the repository at this point in the history
  • Loading branch information
apatil committed Nov 23, 2010
1 parent 6e8eac1 commit 3c6eefb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion __init__.py
@@ -1,3 +1,3 @@
import nsst_cov_fun
from nsst_cov_fun import nonstationary_spatiotemporal
from nsst_cov_fun import nonstationary_spatiotemporal, gtf
from fnsst_cov_fun import *
7 changes: 5 additions & 2 deletions nsst_cov_fun.py
Expand Up @@ -14,11 +14,14 @@
from pymc import get_threadpool_size, map_noreturn
#import MAPdata

__all__ = ['nonstationary_spatiotemporal', 'gtf']
__all__ = ['nonstationary_spatiotemporal', 'default_t_gam_fun']

def default_t_gam_fun(d,x,y,ddx,ddy,st,tlc,sf,cmin=0,cmax=-1,symm=0):
return gtf(d,x,y,ddx,ddy,st,tlc,sf,cmin=0,cmax=-1,symm=0)

# TODO: Do this using the thread pool. There should be a version of the code around that does.

def nonstationary_spatiotemporal(x,y,amp,scale,diff_degree,t_gam_fun=gtf,h=default_h,symm=None,geometry='aniso_geo_rad',**kwds):
def nonstationary_spatiotemporal(x,y,amp,scale,diff_degree,t_gam_fun=default_t_gam_fun,h=default_h,symm=None,geometry='aniso_geo_rad',**kwds):
"""
Spatiotemporal covariance function. Converts x and y
to a matrix of covariances. x and y are assumed to have
Expand Down

0 comments on commit 3c6eefb

Please sign in to comment.