Use ravel instead of flatten for vec()

This commit is contained in:
jan 2017-09-24 19:13:10 -07:00
parent d3c22006bd
commit 7342c8efd7

View File

@ -27,7 +27,7 @@ def vec(f: field_t) -> vfield_t:
"""
if numpy.any(numpy.equal(f, None)):
return None
return numpy.hstack(tuple((fi.flatten(order='C') for fi in f)))
return numpy.hstack(tuple((fi.ravel(order='C') for fi in f)))
def unvec(v: vfield_t, shape: numpy.ndarray) -> field_t: