From d462ae94121b4fbeaaecf13444092137f7da1497 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Tue, 9 Jul 2019 20:12:48 -0700 Subject: [PATCH] unvec to (3, *shape) rather than list-of-ndarrays --- 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 e7b9645..bdc9d6a 100644 --- a/fdfd_tools/vectorization.py +++ b/fdfd_tools/vectorization.py @@ -45,5 +45,5 @@ def unvec(v: vfield_t, shape: numpy.ndarray) -> field_t: """ if numpy.any(numpy.equal(v, None)): return None - return [vi.reshape(shape, order='C') for vi in numpy.split(v, 3)] + return vi.reshape((3, *shape), order='C')