mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-20 12:40:44 +08:00
Ability to run all tests at once.
Removed __init__.py added runTests.py and .sh so that we can run all tests at one time.
This commit is contained in:
+7
-9
@@ -75,9 +75,15 @@ def mkvc(x, numDims=1):
|
||||
return x.flatten(order='F')[:, np.newaxis, np.newaxis]
|
||||
|
||||
|
||||
def ndgrid(xin):
|
||||
def ndgrid(*args):
|
||||
"""Form tensorial grid for 1, 2 and 3 dimensions. Return X1,X2,X3 arrays depending on the dimension"""
|
||||
|
||||
# you can either pass a list [x1, x2, x3] or each seperately
|
||||
if type(args[0]) == list:
|
||||
xin = args[0]
|
||||
else:
|
||||
xin = args
|
||||
|
||||
if len(xin) == 1:
|
||||
return xin
|
||||
elif len(xin) == 2:
|
||||
@@ -88,14 +94,6 @@ def ndgrid(xin):
|
||||
return np.c_[X1, X2, X3]
|
||||
|
||||
|
||||
def flattenF(x):
|
||||
return np.flatten(x, order='F')
|
||||
|
||||
|
||||
def printF(x):
|
||||
pass
|
||||
|
||||
|
||||
def ind2sub(shape, ind):
|
||||
# From the given shape, returns the subscrips of the given index
|
||||
revshp = []
|
||||
|
||||
Reference in New Issue
Block a user