Rearranging util codes. Added meshUtils.closestPoints

This commit is contained in:
rowanc1
2014-04-23 12:11:36 -07:00
parent fb2bc30d96
commit a36f4d76bb
6 changed files with 329 additions and 322 deletions
+1 -8
View File
@@ -1,15 +1,8 @@
import numpy as np
import scipy.sparse as sp
from codeutils import isScalar
def isScalar(f):
scalarTypes = [float, int, long, np.float_, np.int_]
if type(f) in scalarTypes:
return True
elif type(f) == np.ndarray and f.size == 1 and type(f[0]) in scalarTypes:
return True
return False
def mkvc(x, numDims=1):
"""Creates a vector with the number of dimension specified