TimeSteppingInversion and Estimate Initial Beta based on eigenvalues comparison.

This commit is contained in:
Rowan Cockett
2013-11-22 13:39:26 -08:00
parent c41b9f12e9
commit aae725ff05
3 changed files with 76 additions and 19 deletions
+5 -2
View File
@@ -26,9 +26,12 @@ def hook(obj, method, name=None, overwrite=False, silent=False):
if name is None: name = method.__name__
if not hasattr(obj,name) or overwrite:
setattr(obj, name, types.MethodType( method, obj ))
elif not silent:
if getattr(obj,'debug',False):
print 'Method '+name+' was added to class.'
elif not silent or getattr(obj,'debug',False):
print 'Method '+name+' was not overwritten.'
def setKwargs(obj, **kwargs):
"""Sets key word arguments (kwargs) that are present in the object, throw an error if they don't exist."""
for attr in kwargs:
@@ -97,7 +100,7 @@ class Counter(object):
If you want to use this, import *count* or *timeIt* and use them as decorators on class methods.
.. ::
::
class MyClass(object):
def __init__(self, url):