mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-04 05:19:13 +08:00
make fields return vector if only one Tx
This commit is contained in:
@@ -29,9 +29,11 @@ class FieldsTDEM(object):
|
||||
self.set_e(newFields['e'], tInd)
|
||||
|
||||
def fieldVec(self):
|
||||
u = np.ndarray((0,self.nTx))
|
||||
u = np.ndarray((0, self.nTx))
|
||||
for i in range(self.nTimes):
|
||||
u = np.r_[u, self.get_b(i), self.get_e(i)]
|
||||
if self.nTx == 1:
|
||||
u = u.flatten()
|
||||
return u
|
||||
|
||||
####################################################
|
||||
@@ -64,4 +66,4 @@ class FieldsTDEM(object):
|
||||
if self.e is None:
|
||||
self.e = np.zeros((self.nTimes, np.sum(self.mesh.nE), self.nTx))
|
||||
self.e[:] = np.nan
|
||||
self.e[ind,:,:] = e
|
||||
self.e[ind,:,:] = e
|
||||
|
||||
Reference in New Issue
Block a user