mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-23 13:10:51 +08:00
Migrated % string formating
This commit is contained in:
@@ -28,14 +28,14 @@ class RegularizationTests(unittest.TestCase):
|
||||
|
||||
for i, mesh in enumerate(self.meshlist):
|
||||
|
||||
print 'Testing %iD'%mesh.dim
|
||||
print 'Testing {0:d}D'.format(mesh.dim)
|
||||
|
||||
mapping = r.mapPair(mesh)
|
||||
reg = r(mesh, mapping=mapping)
|
||||
m = np.random.rand(mapping.nP)
|
||||
reg.mref = np.ones_like(m)*np.mean(m)
|
||||
|
||||
print 'Check: phi_m (mref) = %f' %reg.eval(reg.mref)
|
||||
print 'Check: phi_m (mref) = {0:f}'.format(reg.eval(reg.mref))
|
||||
passed = reg.eval(reg.mref) < TOL
|
||||
self.assertTrue(passed)
|
||||
|
||||
@@ -56,7 +56,7 @@ class RegularizationTests(unittest.TestCase):
|
||||
|
||||
for i, mesh in enumerate(self.meshlist):
|
||||
|
||||
print 'Testing Active Cells %iD'%(mesh.dim)
|
||||
print 'Testing Active Cells {0:d}D'.format((mesh.dim))
|
||||
|
||||
if mesh.dim == 1:
|
||||
indActive = Utils.mkvc(mesh.gridCC <= 0.8)
|
||||
@@ -70,7 +70,7 @@ class RegularizationTests(unittest.TestCase):
|
||||
m = np.random.rand(mesh.nC)[indAct]
|
||||
reg.mref = np.ones_like(m)*np.mean(m)
|
||||
|
||||
print 'Check: phi_m (mref) = %f' %reg.eval(reg.mref)
|
||||
print 'Check: phi_m (mref) = {0:f}'.format(reg.eval(reg.mref))
|
||||
passed = reg.eval(reg.mref) < TOL
|
||||
self.assertTrue(passed)
|
||||
|
||||
@@ -87,7 +87,7 @@ class RegularizationTests(unittest.TestCase):
|
||||
|
||||
for i, mesh in enumerate(self.meshlist):
|
||||
|
||||
print 'Testing %iD'%mesh.dim
|
||||
print 'Testing {0:d}D'.format(mesh.dim)
|
||||
|
||||
# mapping = r.mapPair(mesh)
|
||||
# reg = r(mesh, mapping=mapping)
|
||||
|
||||
Reference in New Issue
Block a user