forked from jan/fdfd_tools
Use ravel instead of flatten for vec()
This commit is contained in:
parent
d3c22006bd
commit
7342c8efd7
@ -27,7 +27,7 @@ def vec(f: field_t) -> vfield_t:
|
|||||||
"""
|
"""
|
||||||
if numpy.any(numpy.equal(f, None)):
|
if numpy.any(numpy.equal(f, None)):
|
||||||
return 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:
|
def unvec(v: vfield_t, shape: numpy.ndarray) -> field_t:
|
||||||
|
Loading…
Reference in New Issue
Block a user