This commit is contained in:
Nico Hamaus 2014-05-29 15:31:15 +02:00
parent 53398d978c
commit a4b942e3ae
2 changed files with 555 additions and 1 deletions

View file

@ -456,7 +456,7 @@ def getArray(objectList, attr):
if hasattr(objectList[0], attr):
ndim = np.shape( np.atleast_1d( getattr(objectList[0], attr) ) )[0]
attrArr = np.zeros(( len(objectList), ndim ))
}
for idim in xrange(ndim):
attrArr[:,idim] = np.fromiter((np.atleast_1d(getattr(v, attr))[idim] \
for v in objectList), float )