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:
Rowan Cockett
2013-07-09 22:00:17 -07:00
parent 8e3e0e0faa
commit 68b4719aea
5 changed files with 22 additions and 13 deletions
+7 -9
View File
@@ -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 = []