rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
from scipy_test.testing import ScipyTest
from scipy.test.testing import ScipyTest
def _ppimport_importer(self): name = self.__name__
cf7437641c3970f9712152ab4ef39c45532e5297 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/cf7437641c3970f9712152ab4ef39c45532e5297/ppimport.py
import gui_thread_guts
import gui_thread_guts
def exit_gui_thread(last_exit = oldexitfunc): # don't wait on MS platforms -- it hangs. # On X11, we have to shut down the secondary thread. if running_in_second_thread and os.name != 'nt': import gui_thread_guts event_poster = gui_thread_guts.proxy_base() event_catcher = event_poster.catcher finished = threading.Event...
34865d4577575a214163bb59a5d287b7df2430a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/34865d4577575a214163bb59a5d287b7df2430a9/main.py
finished = threading.Event() evt = gui_thread_guts.proxy_event(event_catcher.Close, (),{},finished) event_poster.post(evt) finished.wait()
if in_proxy_call: event_catcher.Close() else: finished = threading.Event() evt = gui_thread_guts.proxy_event(event_catcher.Close, (),{},finished) event_poster.post(evt) finished.wait()
def exit_gui_thread(last_exit = oldexitfunc): # don't wait on MS platforms -- it hangs. # On X11, we have to shut down the secondary thread. if running_in_second_thread and os.name != 'nt': import gui_thread_guts event_poster = gui_thread_guts.proxy_base() event_catcher = event_poster.catcher finished = threading.Event...
34865d4577575a214163bb59a5d287b7df2430a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/34865d4577575a214163bb59a5d287b7df2430a9/main.py
if not hasattr(wx_class, 'init2'): wx_class.init2 = wx_class.__init__
if not hasattr(wx_class, '_iNiT2'): if hasattr(wx_class, '__init__'): wx_class._iNiT2 = wx_class.__init__ else: wx_class._iNiT2 = None
def register(wx_class): """ Create a gui_thread compatible version of wx_class Test whether a proxy is necessary. If so, generate and return the proxy class. if not, just return the wx_class unaltered. """ if running_in_second_thread: #print 'proxy generated' return proxify(wx_class) else: if not hasattr(wx_class, '...
34865d4577575a214163bb59a5d287b7df2430a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/34865d4577575a214163bb59a5d287b7df2430a9/main.py
self.init2(*args,**kw)
"""This is apparently useful for apps like PyCrust.""" if self._iNiT2: self._iNiT2(*args,**kw)
def plain_class__init__(self,*args,**kw): self.init2(*args,**kw) add_close_event_handler(self) self.proxy_object_alive = 1
34865d4577575a214163bb59a5d287b7df2430a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/34865d4577575a214163bb59a5d287b7df2430a9/main.py
results = 'self.wx_obj = finished._result;' \
results = 'self.wx_obj = ret_val;' \
def generate_method(method,wx_class): """ Create a proxy method. This first creates a text version of the method, accounting for slight differences between __init__ methods and all other methods. It converts the text to a code object (using exec) and returns the code object. The code is never actually written to a f...
34865d4577575a214163bb59a5d287b7df2430a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/34865d4577575a214163bb59a5d287b7df2430a9/main.py
results = 'return smart_return(finished._result, self)'
results = 'return smart_return(ret_val)'
def generate_method(method,wx_class): """ Create a proxy method. This first creates a text version of the method, accounting for slight differences between __init__ methods and all other methods. It converts the text to a code object (using exec) and returns the code object. The code is never actually written to a f...
34865d4577575a214163bb59a5d287b7df2430a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/34865d4577575a214163bb59a5d287b7df2430a9/main.py
%(import_statement)s finished = threading.Event()
%(import_statement)s
body = """def %(method)s(self,*args,**kw): \"\"\"%(documentation)s\"\"\" %(pre_test)s from gui_thread_guts import proxy_event, smart_return %(import_statement)s #import statement finished = threading.Event() # remove proxies if present args = dereference_arglist(args) %(arguments)s #arguments evt = proxy_event(%(call_m...
34865d4577575a214163bb59a5d287b7df2430a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/34865d4577575a214163bb59a5d287b7df2430a9/main.py
%(arguments)s evt = proxy_event(%(call_method)s,arg_list,kw,finished) self.post(evt) finished.wait() if finished.exception_info: raise finished.exception_info[0],finished.exception_info[1]
%(arguments)s ret_val = None if in_proxy_call: ret_val = apply(%(call_method)s, arg_list, kw) else: finished = threading.Event() evt = proxy_event(%(call_method)s,arg_list,kw,finished) self.post(evt) finished.wait() if finished.exception_info: raise finished.exception_info[0], \ finished.exception_info[1] ret_val = fin...
body = """def %(method)s(self,*args,**kw): \"\"\"%(documentation)s\"\"\" %(pre_test)s from gui_thread_guts import proxy_event, smart_return %(import_statement)s #import statement finished = threading.Event() # remove proxies if present args = dereference_arglist(args) %(arguments)s #arguments evt = proxy_event(%(call_m...
34865d4577575a214163bb59a5d287b7df2430a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/34865d4577575a214163bb59a5d287b7df2430a9/main.py
return hasattr(x, '_proxy_attr__proxy')
hasattr(x, 'x._proxy_attr__dont_mess_with_me_unless_you_know_what_youre_doing')
def is_proxy_attr(x): return hasattr(x, '_proxy_attr__proxy')
34865d4577575a214163bb59a5d287b7df2430a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/34865d4577575a214163bb59a5d287b7df2430a9/main.py
return self._cdf(k,*args) - self._cdf(k-1,*args)
return self.cdf(k,*args) - self.cdf(k-1,*args)
def _pdf(self, k, *args): return self._cdf(k,*args) - self._cdf(k-1,*args)
7a60946bcd81aa5b89c0700f2a0d4143f8139c55 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/7a60946bcd81aa5b89c0700f2a0d4143f8139c55/distributions.py
def logL(self, b, Y, **extra):
def logL(self, b, Y):
def logL(self, b, Y, **extra): return -scipy.linalg.norm(self.whiten(Y) - N.dot(self.wdesign, b))**2 / 2.
9ddff40881d697c0b8f7657aabf6bd401fbfe489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9ddff40881d697c0b8f7657aabf6bd401fbfe489/regression.py
def __init__(self, design, **keywords): LikelihoodModel.__init__(self, **keywords)
def __init__(self, design): LikelihoodModel.__init__(self)
def __init__(self, design, **keywords): LikelihoodModel.__init__(self, **keywords) self.initialize(design)
9ddff40881d697c0b8f7657aabf6bd401fbfe489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9ddff40881d697c0b8f7657aabf6bd401fbfe489/regression.py
def initialize(self, design, **keywords):
def initialize(self, design):
def initialize(self, design, **keywords): self.design = design self.wdesign = self.whiten(design) self.calc_beta = L.pinv(self.wdesign) self.normalized_cov_beta = N.dot(self.calc_beta, N.transpose(self.calc_beta)) self.df_resid = self.wdesign.shape[0] - utils.rank(self.design)
9ddff40881d697c0b8f7657aabf6bd401fbfe489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9ddff40881d697c0b8f7657aabf6bd401fbfe489/regression.py
def fit(self, Y, **keywords):
def fit(self, Y):
def fit(self, Y, **keywords): """ Full \'fit\' of the model including estimate of covariance matrix, (whitened) residuals and scale.
9ddff40881d697c0b8f7657aabf6bd401fbfe489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9ddff40881d697c0b8f7657aabf6bd401fbfe489/regression.py
def __init__(self, design, rho=0, **keywords): LikelihoodModel.__init__(self, **keywords)
def __init__(self, design, rho=0):
def __init__(self, design, rho=0, **keywords): LikelihoodModel.__init__(self, **keywords) self.rho = rho self.initialize(design)
9ddff40881d697c0b8f7657aabf6bd401fbfe489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9ddff40881d697c0b8f7657aabf6bd401fbfe489/regression.py
self.initialize(design)
ols_model.__init__(self, design)
def __init__(self, design, rho=0, **keywords): LikelihoodModel.__init__(self, **keywords) self.rho = rho self.initialize(design)
9ddff40881d697c0b8f7657aabf6bd401fbfe489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9ddff40881d697c0b8f7657aabf6bd401fbfe489/regression.py
class wls_model(ar_model):
class wls_model(ols_model):
def whiten(self, X): factor = 1. / N.sqrt(1 - self.rho**2) return N.concatenate([[X[0]], (X[1:] - self.rho * X[0:-1]) * factor])
9ddff40881d697c0b8f7657aabf6bd401fbfe489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9ddff40881d697c0b8f7657aabf6bd401fbfe489/regression.py
def __init__(self, design, weights=1, **keywords): LikelihoodModel.__init__(self, **keywords)
def __init__(self, design, weights=1):
def __init__(self, design, weights=1, **keywords): LikelihoodModel.__init__(self, **keywords) self.weights = weights self.initialize(design)
9ddff40881d697c0b8f7657aabf6bd401fbfe489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9ddff40881d697c0b8f7657aabf6bd401fbfe489/regression.py
self.initialize(design)
ols_model.__init__(self, design)
def __init__(self, design, weights=1, **keywords): LikelihoodModel.__init__(self, **keywords) self.weights = weights self.initialize(design)
9ddff40881d697c0b8f7657aabf6bd401fbfe489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9ddff40881d697c0b8f7657aabf6bd401fbfe489/regression.py
norm_resid = self.resid * N.multiply.outer(N.ones(self.Y.shape[0]), sdd) return norm_resid
return self.resid * N.multiply.outer(N.ones(self.Y.shape[0]), sdd)
def norm_resid(self): """ Residuals, normalized to have unit length.
9ddff40881d697c0b8f7657aabf6bd401fbfe489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9ddff40881d697c0b8f7657aabf6bd401fbfe489/regression.py
def predict(self, design): """ Return fitted values from a design matrix. """
9ddff40881d697c0b8f7657aabf6bd401fbfe489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9ddff40881d697c0b8f7657aabf6bd401fbfe489/regression.py
range = abs(upper - lower) if range == 0.:
rng = abs(upper - lower) if rng == 0.:
def auto_ticks(data_bounds, bounds_info = default_bounds): """ Find locations for axis tick marks. Calculate the location for tick marks on an axis. data_bounds is a sequence of 2 numbers specifying the maximum and minimum values of the data along this axis. bounds_info is a sequence of 3 values that specify how the a...
35ea2c2d87fbbfafca1db7236ceb79a8d525d834 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/35ea2c2d87fbbfafca1db7236ceb79a8d525d834/plot_utility.py
if is_base2(range) and is_base2(upper) and range > 4: if range == 2:
if is_base2(rng) and is_base2(upper) and rng > 4: if rng == 2:
def auto_ticks(data_bounds, bounds_info = default_bounds): """ Find locations for axis tick marks. Calculate the location for tick marks on an axis. data_bounds is a sequence of 2 numbers specifying the maximum and minimum values of the data along this axis. bounds_info is a sequence of 3 values that specify how the a...
35ea2c2d87fbbfafca1db7236ceb79a8d525d834 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/35ea2c2d87fbbfafca1db7236ceb79a8d525d834/plot_utility.py
elif range == 4:
elif rng == 4:
def auto_ticks(data_bounds, bounds_info = default_bounds): """ Find locations for axis tick marks. Calculate the location for tick marks on an axis. data_bounds is a sequence of 2 numbers specifying the maximum and minimum values of the data along this axis. bounds_info is a sequence of 3 values that specify how the a...
35ea2c2d87fbbfafca1db7236ceb79a8d525d834 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/35ea2c2d87fbbfafca1db7236ceb79a8d525d834/plot_utility.py
interval = range / 4
interval = rng / 4
def auto_ticks(data_bounds, bounds_info = default_bounds): """ Find locations for axis tick marks. Calculate the location for tick marks on an axis. data_bounds is a sequence of 2 numbers specifying the maximum and minimum values of the data along this axis. bounds_info is a sequence of 3 values that specify how the a...
35ea2c2d87fbbfafca1db7236ceb79a8d525d834 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/35ea2c2d87fbbfafca1db7236ceb79a8d525d834/plot_utility.py
hi_ticks = arange(0,auto_upper+interval,interval) low_ticks = - arange(interval,-auto_lower+interval,interval)
hi_ticks = arange(0,upper+interval,interval) low_ticks = - arange(interval,-lower+interval,interval)
def auto_ticks(data_bounds, bounds_info = default_bounds): """ Find locations for axis tick marks. Calculate the location for tick marks on an axis. data_bounds is a sequence of 2 numbers specifying the maximum and minimum values of the data along this axis. bounds_info is a sequence of 3 values that specify how the a...
35ea2c2d87fbbfafca1db7236ceb79a8d525d834 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/35ea2c2d87fbbfafca1db7236ceb79a8d525d834/plot_utility.py
ticks = arange(auto_lower,auto_upper+interval,interval)
ticks = arange(lower,upper+interval,interval)
def auto_ticks(data_bounds, bounds_info = default_bounds): """ Find locations for axis tick marks. Calculate the location for tick marks on an axis. data_bounds is a sequence of 2 numbers specifying the maximum and minimum values of the data along this axis. bounds_info is a sequence of 3 values that specify how the a...
35ea2c2d87fbbfafca1db7236ceb79a8d525d834 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/35ea2c2d87fbbfafca1db7236ceb79a8d525d834/plot_utility.py
if len(probs) == 1:
if not isscalar(probs) and len(probs) == 1:
def ttest_ind (a, b, axis=0, printit=False, name1='Samp1', name2='Samp2',writemode='a'): """
0c04c1e7f2fc7002edae986ffab22eeee61f5d26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0c04c1e7f2fc7002edae986ffab22eeee61f5d26/stats.py
raise ValueError, 'Unequal length arrays.'
raise ValueError, 'unequal length arrays'
def ttest_rel (a,b,axis=None,printit=False,name1='Samp1',name2='Samp2',writemode='a'): """
0c04c1e7f2fc7002edae986ffab22eeee61f5d26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0c04c1e7f2fc7002edae986ffab22eeee61f5d26/stats.py
t = add.reduce(d,axis) / denom
t = add.reduce(d, axis) / denom
def ttest_rel (a,b,axis=None,printit=False,name1='Samp1',name2='Samp2',writemode='a'): """
0c04c1e7f2fc7002edae986ffab22eeee61f5d26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0c04c1e7f2fc7002edae986ffab22eeee61f5d26/stats.py
if len(probs) == 1:
if not isscalar(probs) and len(probs) == 1:
def ttest_rel (a,b,axis=None,printit=False,name1='Samp1',name2='Samp2',writemode='a'): """
0c04c1e7f2fc7002edae986ffab22eeee61f5d26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0c04c1e7f2fc7002edae986ffab22eeee61f5d26/stats.py
def _drv_pdf(self, xk, *args):
def _drv_pmf(self, xk, *args):
def _drv_pdf(self, xk, *args): try: return self.P[xk] except KeyError: return 0.0
36cabfbe2951857d27dd7276332f9f36c7467b53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/36cabfbe2951857d27dd7276332f9f36c7467b53/distributions.py
ext = Extension(parent_package+'integrate._quadpack',sources)
ext = Extension(parent_package+'integrate._quadpack',sources, library_dirs=atlas_library_dirs, libraries=['quadpack','linpack_lite'] + blas_libraries)
def configuration(parent_package=''): if parent_package: parent_package += '.' local_path = get_path(__name__) config = default_config_dict() if parent_package: config['packages'].append(parent_package+'integrate') #config['packages'].append(parent_package+'integrate.tests') quadpack = glob(os.path.join(local_path,'q...
1967d709e5c24c55d63bab3c4571e2599e5ca6db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/1967d709e5c24c55d63bab3c4571e2599e5ca6db/setup_integrate.py
blas_libraries, lapack_libraries, atlas_library_dirs = get_atlas_info()
def configuration(parent_package=''): if parent_package: parent_package += '.' local_path = get_path(__name__) config = default_config_dict() if parent_package: config['packages'].append(parent_package+'integrate') #config['packages'].append(parent_package+'integrate.tests') quadpack = glob(os.path.join(local_path,'q...
1967d709e5c24c55d63bab3c4571e2599e5ca6db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/1967d709e5c24c55d63bab3c4571e2599e5ca6db/setup_integrate.py
libraries=['odepack','linpack_lite',] + blas_libraries)
libraries=['odepack','linpack_lite'] + blas_libraries)
def configuration(parent_package=''): if parent_package: parent_package += '.' local_path = get_path(__name__) config = default_config_dict() if parent_package: config['packages'].append(parent_package+'integrate') #config['packages'].append(parent_package+'integrate.tests') quadpack = glob(os.path.join(local_path,'q...
1967d709e5c24c55d63bab3c4571e2599e5ca6db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/1967d709e5c24c55d63bab3c4571e2599e5ca6db/setup_integrate.py
)
)
def configuration(parent_package=''): if parent_package: parent_package += '.' local_path = get_path(__name__) config = default_config_dict() if parent_package: config['packages'].append(parent_package+'integrate') #config['packages'].append(parent_package+'integrate.tests') quadpack = glob(os.path.join(local_path,'q...
1967d709e5c24c55d63bab3c4571e2599e5ca6db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/1967d709e5c24c55d63bab3c4571e2599e5ca6db/setup_integrate.py
assert_equal(numstring,array([0.,0.1,0.2,0.3,
assert_almost_equal(numstring,array([0.,0.1,0.2,0.3,
def check_arange(self): numstring = arange(0,2.21,.1) assert_equal(numstring,array([0.,0.1,0.2,0.3, 0.4,0.5,0.6,0.7, 0.8,0.9,1.,1.1, 1.2,1.3,1.4,1.5, 1.6,1.7,1.8,1.9, 2.,2.1,2.2])) numstringa = arange(3,4,.3) assert_array_equal(numstringa, array([3.,3.3,3.6,3.9])) numstringb = arange(3,27,3) assert_array_equal(numstrin...
453fd3caa7bf2311fbdd6285044545bfa24e1a43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/453fd3caa7bf2311fbdd6285044545bfa24e1a43/test_basic.py
assert_equal(lag2.c,array([1,-2*(k+2),(k+1.)*(k+2.)])/2.0) assert_equal(lag3.c,array([-1,3*(k+3),-3*(k+2)*(k+3),(k+1)*(k+2)*(k+3)])/6.0)
assert_almost_equal(lag2.c,array([1,-2*(k+2),(k+1.)*(k+2.)])/2.0) assert_almost_equal(lag3.c,array([-1,3*(k+3),-3*(k+2)*(k+3),(k+1)*(k+2)*(k+3)])/6.0)
def check_genlaguerre(self): k = 5*rand()-0.9 lag0 = genlaguerre(0,k) lag1 = genlaguerre(1,k) lag2 = genlaguerre(2,k) lag3 = genlaguerre(3,k) assert_equal(lag0.c,[1]) assert_equal(lag1.c,[-1,k+1]) assert_equal(lag2.c,array([1,-2*(k+2),(k+1.)*(k+2.)])/2.0) assert_equal(lag3.c,array([-1,3*(k+3),-3*(k+2)*(k+3),(k+1)*(k+2)...
453fd3caa7bf2311fbdd6285044545bfa24e1a43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/453fd3caa7bf2311fbdd6285044545bfa24e1a43/test_basic.py
assert_equal(leg3.c,array([5,0,-3,0])/2.0) assert_equal(leg4.c,array([35,0,-30,0,3])/8.0) assert_equal(leg5.c,array([63,0,-70,0,15,0])/8.0)
assert_almost_equal(leg3.c,array([5,0,-3,0])/2.0) assert_almost_equal(leg4.c,array([35,0,-30,0,3])/8.0) assert_almost_equal(leg5.c,array([63,0,-70,0,15,0])/8.0)
def check_legendre(self): leg0 = legendre(0) leg1 = legendre(1) leg2 = legendre(2) leg3 = legendre(3) leg4 = legendre(4) leg5 = legendre(5) assert_equal(leg0.c,[1]) assert_equal(leg1.c,[1,0]) assert_equal(leg2.c,array([3,0,-1])/2.0) assert_equal(leg3.c,array([5,0,-3,0])/2.0) assert_equal(leg4.c,array([35,0,-30,0,3])/8....
453fd3caa7bf2311fbdd6285044545bfa24e1a43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/453fd3caa7bf2311fbdd6285044545bfa24e1a43/test_basic.py
axis('equal')
try: axis('equal') except AttributeError: _active.client.layout_all() axis('equal')
def image(img,x=None,y=None,colormap = 'grey',scale='no'): """Colormap should really default to the current colormap...""" # check for hold here validate_active() image = wxplt.image_object(img,x,y,colormap=colormap,scale=scale) if not _active.hold in ['on','yes']: _active.line_list.data = [] # clear it out _active.ima...
59c89b534da7c9908b2c641419b46c4a95d5a335 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/59c89b534da7c9908b2c641419b46c4a95d5a335/interface.py
assert_array_almost_equal(dot(a,v[:,i]),w[i]*v[:,i])
assert_array_almost_equal(dot(a,v[:,i]),w[i]*v[:,i],self.decimal)
def check_heev_complex(self,level=1,suffix=''): a= [[1,2-2j,3+7j],[2+2j,2,3],[3-7j,3,5]] exact_w=[-6.305141710654834,2.797880950890922,11.50726075976392] f = getattr(self.lapack,'heev'+suffix) w,v,info=f(a) assert not info,`info` assert_array_almost_equal(w,exact_w) for i in range(3): assert_array_almost_equal(dot(a,v[...
fdfb9407f7e177aa1c1fc45311bee6a21c04c162 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/fdfb9407f7e177aa1c1fc45311bee6a21c04c162/esv_tests.py
except AttributeError:
except (AttributeError, TypeError):
def __call__(self,*args): for arg in args: try: n = len(arg) if (n==0): return self.zerocall(args) except AttributeError: pass return squeeze(arraymap(self.thefunc,args,self.otypes))
8c9572e413d199c0af05a7fcd5bc26460b78eedf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/8c9572e413d199c0af05a7fcd5bc26460b78eedf/basic.py
sources=['sigtoolsmodule.c','firfilter.c','medianfilter.c'],
sources=['sigtoolsmodule.c', 'firfilter.c','medianfilter.c'], depends = ['sigtools.h']
def configuration(parent_package='',top_path=None): from scipy.distutils.misc_util import Configuration config = Configuration('signal', parent_package, top_path) config.add_data_dir('tests') config.add_extension('sigtools', sources=['sigtoolsmodule.c','firfilter.c','medianfilter.c'], ) config.add_extension('spline...
75a5ea6b5949731a870f0154c6f4790e8dd5aa8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/75a5ea6b5949731a870f0154c6f4790e8dd5aa8b/setup.py
def inverse(self, z):
def inverse(self, x):
def inverse(self, z): return N.power(x, 1. / self.power)
647bb06795ae02adc259586799601702e407e398 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/647bb06795ae02adc259586799601702e407e398/links.py
"""Associated Legendre functions of the second kind, Pmn(z) and its
"""Associated Legendre functions of the first kind, Pmn(z) and its
def lpmn(m,n,z): """Associated Legendre functions of the second kind, Pmn(z) and its derivative, Pmn'(z) of order m and degree n. Returns two arrays of size (m+1,n+1) containing Pmn(z) and Pmn'(z) for all orders from 0..m and degrees from 0..n. z can be complex. """ if not isscalar(m) or (abs(m)>n): raise ValueError,...
1dd759c870a3397fc61e94997defff945cbe808e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/1dd759c870a3397fc61e94997defff945cbe808e/basic.py
temp = coo_matrix((s, ij), dims=dims, nzmax=nzmax, \
temp = coo_matrix( s, ij, dims=dims, nzmax=nzmax, \
def __init__(self, arg1, dims=(None,None), nzmax=100, dtype='d', copy=False): spmatrix.__init__(self) if isdense(arg1): # Convert the dense matrix arg1 to CSC format if rank(arg1) == 2: s = asarray(arg1) if s.dtypechar not in 'fdFD': # Use a double array as the source (but leave it alone) s = s*1.0 if (rank(s) == 2): M...
0b2d25691f3b5b478761024814ba8dc28534e0fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0b2d25691f3b5b478761024814ba8dc28534e0fb/sparse.py
temp = coo_matrix(s, ijnew, dims=(M, N), nzmax=nzmax, dtype=dtype) temp = temp.tocsr()
temp = coo_matrix(s, ijnew, dims=dims, nzmax=nzmax, dtype=dtype).tocsr()
def __init__(self, arg1, dims=(None,None), nzmax=100, dtype='d', copy=False): spmatrix.__init__(self) if isdense(arg1): # Convert the dense matrix arg1 to CSR format if rank(arg1) == 2: s = asarray(arg1) ocsc = csc_matrix(transpose(s)) self.colind = ocsc.rowind self.indptr = ocsc.indptr self.data = ocsc.data self.shape...
0b2d25691f3b5b478761024814ba8dc28534e0fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0b2d25691f3b5b478761024814ba8dc28534e0fb/sparse.py
self.colind = temp.rowind
self.colind = temp.colind
def __init__(self, arg1, dims=(None,None), nzmax=100, dtype='d', copy=False): spmatrix.__init__(self) if isdense(arg1): # Convert the dense matrix arg1 to CSR format if rank(arg1) == 2: s = asarray(arg1) ocsc = csc_matrix(transpose(s)) self.colind = ocsc.rowind self.indptr = ocsc.indptr self.data = ocsc.data self.shape...
0b2d25691f3b5b478761024814ba8dc28534e0fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0b2d25691f3b5b478761024814ba8dc28534e0fb/sparse.py
def __init__(self, arg1, dims=(None,None), nzmax=100, dtype='d', copy=False): spmatrix.__init__(self) if isdense(arg1): # Convert the dense matrix arg1 to CSR format if rank(arg1) == 2: s = asarray(arg1) ocsc = csc_matrix(transpose(s)) self.colind = ocsc.rowind self.indptr = ocsc.indptr self.data = ocsc.data self.shape...
0b2d25691f3b5b478761024814ba8dc28534e0fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0b2d25691f3b5b478761024814ba8dc28534e0fb/sparse.py
def __init__(self, obj, ij, dims=None, nzmax=None, dtype=None):
def __init__(self, obj, ij_in, dims=None, nzmax=None, dtype=None):
def __init__(self, obj, ij, dims=None, nzmax=None, dtype=None): spmatrix.__init__(self) try: # Assume the first calling convention assert len(ij) == 2 if dims is None: M = int(amax(ij[0])) N = int(amax(ij[1])) self.shape = (M, N) else: # Use 2 steps to ensure dims has length 2. M, N = dims self.shape = (M, N) self.row ...
0b2d25691f3b5b478761024814ba8dc28534e0fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0b2d25691f3b5b478761024814ba8dc28534e0fb/sparse.py
assert len(ij) == 2
if len(ij_in) != 2: if isdense( ij_in ) and (ij_in.shape[1] == 2): ij = (ij_in[:,0], ij_in[:,1]) else: raise AssertionError else: ij = ij_in
def __init__(self, obj, ij, dims=None, nzmax=None, dtype=None): spmatrix.__init__(self) try: # Assume the first calling convention assert len(ij) == 2 if dims is None: M = int(amax(ij[0])) N = int(amax(ij[1])) self.shape = (M, N) else: # Use 2 steps to ensure dims has length 2. M, N = dims self.shape = (M, N) self.row ...
0b2d25691f3b5b478761024814ba8dc28534e0fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0b2d25691f3b5b478761024814ba8dc28534e0fb/sparse.py
self.row = asarray(ij[0], 'i') self.col = asarray(ij[1], 'i')
self.row = asarray(ij[0]) self.col = asarray(ij[1])
def __init__(self, obj, ij, dims=None, nzmax=None, dtype=None): spmatrix.__init__(self) try: # Assume the first calling convention assert len(ij) == 2 if dims is None: M = int(amax(ij[0])) N = int(amax(ij[1])) self.shape = (M, N) else: # Use 2 steps to ensure dims has length 2. M, N = dims self.shape = (M, N) self.row ...
0b2d25691f3b5b478761024814ba8dc28534e0fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0b2d25691f3b5b478761024814ba8dc28534e0fb/sparse.py
raise "could not import pylab"
raise ImportError, "could not import pylab"
def main(): parser = OptionParser( usage = usage ) parser.add_option( "-c", "--compare", action = "store_true", dest = "compare", default = False, help = "compare with default scipy.sparse solver [default: %default]" ) parser.add_option( "-p", "--plot", action = "store_true", dest = "plot", default = False, help = "plo...
cecc9fce65da8b1cada916c7bd787391a1165b6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/cecc9fce65da8b1cada916c7bd787391a1165b6b/test_umfpack.py
config = Configuration(None, parent_package, top_path, maintainer = "SciPy Developers", maintainer_email = "scipy-dev@scipy.org", description = "Scientific Algorithms Library for Python", url = "http://www.scipy.org", license = 'BSD', )
config = Configuration(None, parent_package, top_path)
def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration(None, parent_package, top_path, maintainer = "SciPy Developers", maintainer_email = "scipy-dev@scipy.org", description = "Scientific Algorithms Library for Python", url = "http://www.scipy.org"...
bc6100f003941bc7ae54f63adea8af817acfdf0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/bc6100f003941bc7ae54f63adea8af817acfdf0f/setup.py
config.name = 'scipy'
def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration(None, parent_package, top_path, maintainer = "SciPy Developers", maintainer_email = "scipy-dev@scipy.org", description = "Scientific Algorithms Library for Python", url = "http://www.scipy.org"...
bc6100f003941bc7ae54f63adea8af817acfdf0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/bc6100f003941bc7ae54f63adea8af817acfdf0f/setup.py
from version import version as version config.dict_append(version=version)
config.get_version('Lib/version.py')
def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration(None, parent_package, top_path, maintainer = "SciPy Developers", maintainer_email = "scipy-dev@scipy.org", description = "Scientific Algorithms Library for Python", url = "http://www.scipy.org"...
bc6100f003941bc7ae54f63adea8af817acfdf0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/bc6100f003941bc7ae54f63adea8af817acfdf0f/setup.py
setup( configuration=configuration )
from version import version as version setup( name = 'scipy', version = version, maintainer = "SciPy Developers", maintainer_email = "scipy-dev@scipy.org", description = "Scientific Algorithms Library for Python", url = "http://www.scipy.org", license = 'BSD', configuration=configuration )
def setup_package(): from numpy.distutils.core import setup from numpy.distutils.misc_util import Configuration old_path = os.getcwd() local_path = os.path.dirname(os.path.abspath(sys.argv[0])) os.chdir(local_path) sys.path.insert(0,local_path) sys.path.insert(0,os.path.join(local_path,'Lib')) # to retrive version t...
bc6100f003941bc7ae54f63adea8af817acfdf0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/bc6100f003941bc7ae54f63adea8af817acfdf0f/setup.py
from scipy.distutils.core import setup setup(**configuration(top_path=''))
setup_package()
def configuration(parent_package='',top_path=None): from scipy.distutils.misc_util import Configuration config = Configuration() config.add_subpackage('Lib') return config.todict()
fd9c0fe68b5dc8e687422a1709d66cd508eba282 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/fd9c0fe68b5dc8e687422a1709d66cd508eba282/setup.py
winfun = blackmanharris
winfunc = blackmanharris
def get_window(window,Nx,fftbins=1): """Return a window of length Nx and type window. If fftbins is 1, create a "periodic" window ready to use with ifftshift and be multiplied by the result of an fft (SEE ALSO fftfreq). Window types: boxcar, triang, blackman, hamming, hanning, bartlett, parzen, bohman, blackmanharri...
63d8e8d7616b114c10659baa34e30d182a840851 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/63d8e8d7616b114c10659baa34e30d182a840851/signaltools.py
winfun = parzen
winfunc = parzen
def get_window(window,Nx,fftbins=1): """Return a window of length Nx and type window. If fftbins is 1, create a "periodic" window ready to use with ifftshift and be multiplied by the result of an fft (SEE ALSO fftfreq). Window types: boxcar, triang, blackman, hamming, hanning, bartlett, parzen, bohman, blackmanharri...
63d8e8d7616b114c10659baa34e30d182a840851 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/63d8e8d7616b114c10659baa34e30d182a840851/signaltools.py
bytestr = str(var.itemsize()*Numeric.product(var.shape))
bytestr = str(var.itemsize*Numeric.product(var.shape))
def who(vardict=None): """Print the scipy arrays in the given dictionary (or globals() if None). """ if vardict is None: frame = sys._getframe().f_back vardict = frame.f_globals sta = [] cache = {} for name in vardict.keys(): if isinstance(vardict[name],Numeric.ArrayType): var = vardict[name] idv = id(var) if idv in ca...
6abca17924a00fc2d4eaca2a48f22355760c96e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/6abca17924a00fc2d4eaca2a48f22355760c96e3/common.py
def who(vardict=None): """Print the scipy arrays in the given dictionary (or globals() if None). """ if vardict is None: frame = sys._getframe().f_back vardict = frame.f_globals sta = [] cache = {} for name in vardict.keys(): if isinstance(vardict[name],Numeric.ArrayType): var = vardict[name] idv = id(var) if idv in ca...
6abca17924a00fc2d4eaca2a48f22355760c96e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/6abca17924a00fc2d4eaca2a48f22355760c96e3/common.py
def test(level=10): from numpy.test.testing import module_test module_test(__name__,__file__,level=level) def test_suite(level=1): from numpy.test.testing import module_test_suite return module_test_suite(__name__,__file__,level=level)
def test(level=10): from numpy.test.testing import module_test module_test(__name__,__file__,level=level)
6abca17924a00fc2d4eaca2a48f22355760c96e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/6abca17924a00fc2d4eaca2a48f22355760c96e3/common.py
config.add_data_files(('gistdata',xplt_files))
config.add_data_dir('gistdata') config.add_data_dir((os.path.join(config.path_in_package,'gistdata'), os.path.abspath(config.paths('src/g')[0])))
def get_playsource(extension,build_dir): if windows: playsource = winsource + allsource elif cygwin: playsource = unixsource + winsource + allsource elif macosx: playsource = unixsource + macsource + allsource else: playsource = unixsource + x11source + allsource sources = [os.path.join(local_path,n) for n in playsourc...
8788c1da4dd4951ebe926e36cf9e82a96503e43d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/8788c1da4dd4951ebe926e36cf9e82a96503e43d/setup.py
print bounds_info print data_bounds print ticks
def auto_ticks(data_bounds, bounds_info = default_bounds): """ Find locations for axis tick marks. Calculate the location for tick marks on an axis. data_bounds is a sequence of 2 numbers specifying the maximum and minimum values of the data along this axis. bounds_info is a sequence of 3 values that specify how the a...
e66ba78e3d68e7540df692b5e38d8b8334bab9b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/e66ba78e3d68e7540df692b5e38d8b8334bab9b7/plot_utility.py
ext_args['define_macros'] = [('ATLAS_INFO','"%s"' % atlas_version)]
if sys.platform=='win32': ext_args['define_macros'] = [('ATLAS_INFO','"\\"%s\\""' % atlas_version)] else: ext_args['define_macros'] = [('ATLAS_INFO','"%s"' % atlas_version)]
def configuration(parent_package='',parent_path=None): from scipy_distutils.core import Extension from scipy_distutils.misc_util import fortran_library_item, dot_join,\ SourceGenerator, get_path, default_config_dict, get_build_temp from scipy_distutils.system_info import get_info,dict_append,\ AtlasNotFoundError,Lapack...
2b3614319420f19f7e0bbe3e4ab259e95f2e5474 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/2b3614319420f19f7e0bbe3e4ab259e95f2e5474/setup_linalg.py
assert_array_equal(y.imag,real(y))
assert_array_equal(y.imag,imag(y))
def check_cmplx(self): y = rand(10,)+1j*rand(10,) assert_array_equal(y.imag,real(y))
59d6286a5b1d133debddbb784988df02f719fd5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/59d6286a5b1d133debddbb784988df02f719fd5c/test_misc.py
z = array([-1,0,1]))
z = array([-1,0,1])
def check_fail(self): z = array([-1,0,1])) res = iscomplex(z) assert(not sometrue(res))
59d6286a5b1d133debddbb784988df02f719fd5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/59d6286a5b1d133debddbb784988df02f719fd5c/test_misc.py
z = array([-1,0,1j]))
z = array([-1,0,1j])
def check_pass(self): z = array([-1,0,1j])) res = isreal(z) assert_array_equal(res,[1,1,0])
59d6286a5b1d133debddbb784988df02f719fd5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/59d6286a5b1d133debddbb784988df02f719fd5c/test_misc.py
class test_real_if_close(unittest.TestCase): def check_basic(self): a = randn(10) b = real_if_close(a+1e-15j) assert(array_is_real(b)) assert_array_equal(a,b)
def check_trailing_skip(self): a= array([0,0,1,0,2,3,0,4,0]) res = trim_zeros(a) assert_array_equal(res,array([1,0,2,3,0,4]))
59d6286a5b1d133debddbb784988df02f719fd5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/59d6286a5b1d133debddbb784988df02f719fd5c/test_misc.py
def bayes_mvs(data,alpha=0.90): """Return Bayesian confidence intervals for the mean, var, and std. Assumes 1-d data all has same mean and variance and uses Jeffrey's prior for variance and std. alpha gives the probability that the returned interval contains the true parameter. Uses peak of conditional pdf as starti...
c2b82a6c3287b6c99c72891a654ee06c261efaf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/c2b82a6c3287b6c99c72891a654ee06c261efaf6/morestats.py
peak = 2/(n+1.) a = (n-1)/2.0 F_peak = distributions.invgamma.cdf(peak,a)
a = (n-1)/2.0 if (n > 3): peak = 2/(n-3.0) F_peak = distributions.invgamma.cdf(peak,a) else: F_peak = -1.0 if (F_peak < alpha/2.0): peak = distributions.invgamma.ppf(0.5,a) F_peak = 0.5
def bayes_mvs(data,alpha=0.90): """Return Bayesian confidence intervals for the mean, var, and std. Assumes 1-d data all has same mean and variance and uses Jeffrey's prior for variance and std. alpha gives the probability that the returned interval contains the true parameter. Uses peak of conditional pdf as starti...
c2b82a6c3287b6c99c72891a654ee06c261efaf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/c2b82a6c3287b6c99c72891a654ee06c261efaf6/morestats.py
if (q1 < 0): q2 = alpha va = 0.0 else: va = fac*distributions.invgamma.ppf(q1,a)
if (q2 > 1): q2 = 1.0 va = fac*distributions.invgamma.ppf(q1,a)
def bayes_mvs(data,alpha=0.90): """Return Bayesian confidence intervals for the mean, var, and std. Assumes 1-d data all has same mean and variance and uses Jeffrey's prior for variance and std. alpha gives the probability that the returned interval contains the true parameter. Uses peak of conditional pdf as starti...
c2b82a6c3287b6c99c72891a654ee06c261efaf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/c2b82a6c3287b6c99c72891a654ee06c261efaf6/morestats.py
peak = sqrt(2./n) F_peak = distributions.gengamma.cdf(peak,a,-2)
if (n > 2): peak = special.gamma(a-0.5) / special.gamma(a) F_peak = distributions.gengamma.cdf(peak,a,-2) else: F_peak = -1.0 if (F_peak < alpha/2.0): peak = distributions.gengamma.ppf(0.5,a,-2) F_peak = 0.5
def bayes_mvs(data,alpha=0.90): """Return Bayesian confidence intervals for the mean, var, and std. Assumes 1-d data all has same mean and variance and uses Jeffrey's prior for variance and std. alpha gives the probability that the returned interval contains the true parameter. Uses peak of conditional pdf as starti...
c2b82a6c3287b6c99c72891a654ee06c261efaf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/c2b82a6c3287b6c99c72891a654ee06c261efaf6/morestats.py
if (q1 < 0): q2 = alpha sta = 0.0 else: sta = fac*distributions.gengamma.ppf(q1,a,-2)
if (q2 > 1): q2 = 1.0 sta = fac*distributions.gengamma.ppf(q1,a,-2)
def bayes_mvs(data,alpha=0.90): """Return Bayesian confidence intervals for the mean, var, and std. Assumes 1-d data all has same mean and variance and uses Jeffrey's prior for variance and std. alpha gives the probability that the returned interval contains the true parameter. Uses peak of conditional pdf as starti...
c2b82a6c3287b6c99c72891a654ee06c261efaf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/c2b82a6c3287b6c99c72891a654ee06c261efaf6/morestats.py
the_server=SocketServer.ThreadingTCPServer( (host, port), standard_sync_handler)
the_server=MyThreadingTCPServer( (host, port), standard_sync_handler)
def server(host=default_host,port=10000): import os global server_pid server_pid = os.getpid() sync_cluster.server_pid = server_pid print "starting server on %s:%s" % (host,port) print server_pid #the_server=SocketServer.TCPServer( (host, port), standard_sync_handler) #the_server=SocketServer.ForkingTCPServer( (host, p...
a87ededb4efa7cc9dae253b61b8b29f8bce29964 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/a87ededb4efa7cc9dae253b61b8b29f8bce29964/sync_cluster.py
c_decl = "fortranname(%s)" % new_name
c_decl = "fortranname %s" % new_name
def rename_functions(interface_in,prefix,suffix): sub_list = all_subroutines(interface_in) interface = '' for sub in sub_list: name = function_name(sub) new_name = prefix+name+suffix c_decl = "fortranname(%s)" % new_name #renamed_sub = string.replace(sub, name ,new_name ,1) renamed_sub = sub renamed_sub = string.replac...
db393baf597b12d2422b24131319288ccf17770b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/db393baf597b12d2422b24131319288ccf17770b/interface_gen.py
"""
"""
def usage(): s = "usage: python interface_gen.py file_name module_name\n" \ "\n" \ " file_name -- file containing generic description of\n" \ " lapack interface\n" \ " module_name -- name of module to generate\n" print s
db393baf597b12d2422b24131319288ccf17770b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/db393baf597b12d2422b24131319288ccf17770b/interface_gen.py
ord = 1 computes the largest row sum ord = -1 computes the smallest row sum ord = Inf computes the largest column sum ord = -Inf computes the smallest column sum
ord = 1 computes the largest column sum of absolute values ord = -1 computes the smallest column sum of absolute values ord = Inf computes the largest row sum of absolute values ord = -Inf computes the smallest row sum of absolute values
def norm(x, ord=2): """ norm(x, ord=2) -> n Matrix and vector norm. Inputs: x -- a rank-1 (vector) or rank-2 (matrix) array ord -- the order of norm. Comments: For vectors ord can be any real number including Inf or -Inf. ord = Inf, computes the maximum of the magnitudes ord = -Inf, computes minimum of the magnitu...
452748c71b17d9f7d20ea4ccaf500e7805c8bcf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/452748c71b17d9f7d20ea4ccaf500e7805c8bcf7/basic.py
'iwrk':array([],intc),'u': array([],float),
'iwrk':array([],int32),'u': array([],float),
def splprep(x,w=None,u=None,ub=None,ue=None,k=3,task=0,s=None,t=None, full_output=0,nest=None,per=0,quiet=1): """Find the B-spline representation of an N-dimensional curve. Description: Given a list of N rank-1 arrays, x, which represent a curve in N-dimensional space parametrized by u, find a smooth approximating sp...
9a0347e760bcb96ee1fc399da0a604243f75cec4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9a0347e760bcb96ee1fc399da0a604243f75cec4/fitpack.py
'iwrk':array([],intc)}
'iwrk':array([],int32)}
def splprep(x,w=None,u=None,ub=None,ue=None,k=3,task=0,s=None,t=None, full_output=0,nest=None,per=0,quiet=1): """Find the B-spline representation of an N-dimensional curve. Description: Given a list of N rank-1 arrays, x, which represent a curve in N-dimensional space parametrized by u, find a smooth approximating sp...
9a0347e760bcb96ee1fc399da0a604243f75cec4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9a0347e760bcb96ee1fc399da0a604243f75cec4/fitpack.py
_curfit_cache['iwrk'] = empty((nest,),intc)
_curfit_cache['iwrk'] = empty((nest,),int32)
def splrep(x,y,w=None,xb=None,xe=None,k=3,task=0,s=1e-3,t=None, full_output=0,per=0,quiet=1): """Find the B-spline representation of 1-D curve. Description: Given the set of data points (x[i], y[i]) determine a smooth spline approximation of degree k on the interval xb <= x <= xe. The coefficients, c, and the knot p...
9a0347e760bcb96ee1fc399da0a604243f75cec4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9a0347e760bcb96ee1fc399da0a604243f75cec4/fitpack.py
'wrk': array([],float), 'iwrk':array([],intc)}
'wrk': array([],float), 'iwrk':array([],int32)}
#def _curfit(x,y,w=None,xb=None,xe=None,k=3,task=0,s=None,t=None,
9a0347e760bcb96ee1fc399da0a604243f75cec4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/9a0347e760bcb96ee1fc399da0a604243f75cec4/fitpack.py
app.MainLoop() gui_thread_finished.set()
try: app.MainLoop() finally: gui_thread_finished.set()
def gui_thread(finished): """ Indirectly imports wxPython into the second thread """ import sys try: # If we can find a module named wxPython. Odds are (maybe 100%), # we don't want to start a new thread with a MainLoop() in it. if not sys.modules.has_key('wxPython'): #import must be done inside if statement!!! from g...
f4c0aa6cdb582dd11b29d9f08256052fa4375ff0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/f4c0aa6cdb582dd11b29d9f08256052fa4375ff0/main.py
hasattr(x,'is_proxy')
return hasattr(x,'is_proxy')
def is_proxy(x): hasattr(x,'is_proxy')
f4c0aa6cdb582dd11b29d9f08256052fa4375ff0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/f4c0aa6cdb582dd11b29d9f08256052fa4375ff0/main.py
def configuration(parent_package=''): package = 'odr' config = Configuration(package,parent_package) local_path = get_path(__name__)
def configuration(parent_package='', top_path=None): config = Configuration('odr', parent_package, top_path)
def configuration(parent_package=''): package = 'odr' config = Configuration(package,parent_package) local_path = get_path(__name__) libodr_files = ['d_odr.f', 'd_mprec.f', 'dlunoc.f'] atlas_info = get_info('atlas') #atlas_info = {} # uncomment if ATLAS is available but want to use # Fortran LAPACK/BLAS; useful for t...
aecb4ec4e3c2d9f447453b41152a4c3b45e46610 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/aecb4ec4e3c2d9f447453b41152a4c3b45e46610/setup_odr.py
libodr = [os.path.join(local_path, 'odrpack', x) for x in libodr_files]
libodr = [os.path.join('odrpack', x) for x in libodr_files]
def configuration(parent_package=''): package = 'odr' config = Configuration(package,parent_package) local_path = get_path(__name__) libodr_files = ['d_odr.f', 'd_mprec.f', 'dlunoc.f'] atlas_info = get_info('atlas') #atlas_info = {} # uncomment if ATLAS is available but want to use # Fortran LAPACK/BLAS; useful for t...
aecb4ec4e3c2d9f447453b41152a4c3b45e46610 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/aecb4ec4e3c2d9f447453b41152a4c3b45e46610/setup_odr.py
include_dirs=[local_path],
include_dirs=['.'],
def configuration(parent_package=''): package = 'odr' config = Configuration(package,parent_package) local_path = get_path(__name__) libodr_files = ['d_odr.f', 'd_mprec.f', 'dlunoc.f'] atlas_info = get_info('atlas') #atlas_info = {} # uncomment if ATLAS is available but want to use # Fortran LAPACK/BLAS; useful for t...
aecb4ec4e3c2d9f447453b41152a4c3b45e46610 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/aecb4ec4e3c2d9f447453b41152a4c3b45e46610/setup_odr.py
setup(**configuration())
setup(**configuration(top_path='').todict())
def configuration(parent_package=''): package = 'odr' config = Configuration(package,parent_package) local_path = get_path(__name__) libodr_files = ['d_odr.f', 'd_mprec.f', 'dlunoc.f'] atlas_info = get_info('atlas') #atlas_info = {} # uncomment if ATLAS is available but want to use # Fortran LAPACK/BLAS; useful for t...
aecb4ec4e3c2d9f447453b41152a4c3b45e46610 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/aecb4ec4e3c2d9f447453b41152a4c3b45e46610/setup_odr.py
typecode = _coerce_rules[(self._typecode,other._typecode)] data1, data2 = _convert_data(self.data, other.data, typecode)
typecode = _coerce_rules[(self._typecode,ocs._typecode)] data1, data2 = _convert_data(self.data, ocs.data, typecode)
def __sub__(self, other): ocs = csc_matrix(other) if (ocs.shape != self.shape): raise ValueError, "Inconsistent shapes." typecode = _coerce_rules[(self._typecode,other._typecode)] data1, data2 = _convert_data(self.data, other.data, typecode) func = getattr(sparsetools,_transtabl[typecode]+'cscadd') c,rowc,ptrc,ierr = f...
e99e5203975fe3a9d552183da484d14ad3139e3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/e99e5203975fe3a9d552183da484d14ad3139e3c/Sparse.py
c,rowc,ptrc,ierr = func(data1,self.rowind,self.indptr,-data2,other.rowind,other.indptr)
c,rowc,ptrc,ierr = func(data1,self.rowind,self.indptr,-data2,ocs.rowind,ocs.indptr)
def __sub__(self, other): ocs = csc_matrix(other) if (ocs.shape != self.shape): raise ValueError, "Inconsistent shapes." typecode = _coerce_rules[(self._typecode,other._typecode)] data1, data2 = _convert_data(self.data, other.data, typecode) func = getattr(sparsetools,_transtabl[typecode]+'cscadd') c,rowc,ptrc,ierr = f...
e99e5203975fe3a9d552183da484d14ad3139e3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/e99e5203975fe3a9d552183da484d14ad3139e3c/Sparse.py
typecode = _coerce_rules[(self._typecode,other._typecode)] data1, data2 = _convert_data(self.data, other.data, typecode)
typecode = _coerce_rules[(self._typecode,ocs._typecode)] data1, data2 = _convert_data(self.data, ocs.data, typecode)
def __rsub__(self, other): # implement other - self ocs = csc_matrix(other) if (ocs.shape != self.shape): raise ValueError, "Inconsistent shapes." typecode = _coerce_rules[(self._typecode,other._typecode)] data1, data2 = _convert_data(self.data, other.data, typecode) func = getattr(sparsetools,_transtabl[typecode]+'cs...
e99e5203975fe3a9d552183da484d14ad3139e3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/e99e5203975fe3a9d552183da484d14ad3139e3c/Sparse.py
c,rowc,ptrc,ierr = func(-data1,self.rowind,self.indptr,data2,other.rowind,other.indptr)
c,rowc,ptrc,ierr = func(-data1,self.rowind,self.indptr,data2,ocs.rowind,ocs.indptr)
def __rsub__(self, other): # implement other - self ocs = csc_matrix(other) if (ocs.shape != self.shape): raise ValueError, "Inconsistent shapes." typecode = _coerce_rules[(self._typecode,other._typecode)] data1, data2 = _convert_data(self.data, other.data, typecode) func = getattr(sparsetools,_transtabl[typecode]+'cs...
e99e5203975fe3a9d552183da484d14ad3139e3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/e99e5203975fe3a9d552183da484d14ad3139e3c/Sparse.py
target_dir = join(target_dir,'atlas321')
target_dir = os.path.join(target_dir,'atlas321')
def local_glob(path): return glob(os.path.join(local_path,path))
0a5f7f39ba004d3b195121a4cd75bba9ff069149 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0a5f7f39ba004d3b195121a4cd75bba9ff069149/setup_lapack.py
target = join(build_dir,target_dir,'clapack.pyf')
target = os.path.join(build_dir,target_dir,'clapack.pyf')
def get_clapack_source(ext, build_dir): name = ext.name.split('.')[-1] assert name=='clapack',`name` if atlas_version is None: target = join(build_dir,target_dir,'clapack.pyf') from distutils.dep_util import newer if newer(__file__,target): f = open(source,'w') f.write(tmpl_empty_clapack_pyf) f.close() else: target = e...
0a5f7f39ba004d3b195121a4cd75bba9ff069149 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0a5f7f39ba004d3b195121a4cd75bba9ff069149/setup_lapack.py
namelength = self.read_element()
namelength = self.read_element()[0]
def get_raw_array(self): namelength = self.read_element() # get field names names = self.read_element() splitnames = [names[i:i+namelength] for i in \ xrange(0,len(names),namelength)] self.obj_template._fieldnames = [x.tostring().strip('\x00') for x in splitnames] return super(Mat5StructMatrixGetter, self).get_raw_arra...
2036af607acb2df8f7607e2e9cb47872bc407312 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/2036af607acb2df8f7607e2e9cb47872bc407312/mio5.py
def bracket(func, xa=0.0, xb=1.0, args=(), grow_limit=110.0):
def bracket(func, xa=0.0, xb=1.0, args=(), grow_limit=110.0, maxiter=1000):
def bracket(func, xa=0.0, xb=1.0, args=(), grow_limit=110.0): """Given a function and distinct initial points, search in the downhill direction (as defined by the initital points) and return new points xa, xb, xc that bracket the minimum of the function: f(xa) > f(xb) < f(xc) """ _gold = 1.618034 _verysmall_num = 1e-21...
3b3f958ee4591a8bc4df4568d445bf78c10ea7fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/3b3f958ee4591a8bc4df4568d445bf78c10ea7fe/optimize.py
if iter > 1000:
if iter > maxiter:
def bracket(func, xa=0.0, xb=1.0, args=(), grow_limit=110.0): """Given a function and distinct initial points, search in the downhill direction (as defined by the initital points) and return new points xa, xb, xc that bracket the minimum of the function: f(xa) > f(xb) < f(xc) """ _gold = 1.618034 _verysmall_num = 1e-21...
3b3f958ee4591a8bc4df4568d445bf78c10ea7fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/3b3f958ee4591a8bc4df4568d445bf78c10ea7fe/optimize.py
if not _hold:
if not _hold and gist.plsys() < 2:
def matplot(x,y=None,axis=-1): if y is None: # no axis data y = x x = Numeric.arange(0,y.shape[axis]) x,y = Numeric.asarray(x), Numeric.asarray(y) assert(len(y.shape)==2) assert(len(x)==y.shape[axis]) otheraxis = (1+axis) % 2 sliceobj = [slice(None)]*2 if not _hold: gist.fma() clear_global_linetype() for k in range(y...
d31b1aed025e9765ed229fd77d6341f36f1473cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/d31b1aed025e9765ed229fd77d6341f36f1473cc/Mplot.py