mirror of
https://github.com/wassname/simpeg.git
synced 2026-06-28 14:12:43 +08:00
minor updates in interpolation in TensorMesh
This commit is contained in:
@@ -220,8 +220,12 @@ class BaseTensorMesh(BaseRectangularMesh):
|
||||
if type(loc) == list:
|
||||
loc = np.array(loc)
|
||||
assert type(loc) == np.ndarray, "must be a numpy array"
|
||||
|
||||
if loc.size == self.dim:
|
||||
loc = np.atleast_2d(loc)
|
||||
|
||||
if self.dim > 1:
|
||||
assert loc.shape[1] == self.dim, "must be a column vector of shape (nPts, mesh.dim)"
|
||||
assert loc.shape[1] == self.dim, "must be a column vector of shape (nPts, mesh.dim) not (%d,%d)" % loc.shape
|
||||
elif len(loc.shape) == 1:
|
||||
loc = loc[:,np.newaxis]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user