mirror of
https://github.com/wassname/simpeg.git
synced 2026-10-01 12:31:30 +08:00
Simplifications to Regularization code.
This commit is contained in:
1 parent
21d0a772bc
commit
43b81e1396
2 files changed
+62
-67
No files matched your search
@@ -124,6 +124,15 @@ def callHooks(match):
|
||||
return wrapper
|
||||
return callHooksWrap
|
||||
|
||||
def dependentProperty(name, value, children, doc):
|
||||
def fget(self): return getattr(self,name,value)
|
||||
def fset(self, val):
|
||||
for child in children:
|
||||
if hasattr(self, child):
|
||||
delattr(self, child)
|
||||
setattr(self, name, val)
|
||||
return property(fget=fget, fset=fset, doc=doc)
|
||||
|
||||
|
||||
class Counter(object):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user