From 7342c8efd7b246ae6c3182b5970dcddb0e86417f Mon Sep 17 00:00:00 2001 From: jan Date: Sun, 24 Sep 2017 19:13:10 -0700 Subject: [PATCH] Use ravel instead of flatten for vec() --- fdfd_tools/vectorization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdfd_tools/vectorization.py b/fdfd_tools/vectorization.py index 2377d39..1c2134a 100644 --- a/fdfd_tools/vectorization.py +++ b/fdfd_tools/vectorization.py @@ -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: