unvec to (3, *shape) rather than list-of-ndarrays

This commit is contained in:
Jan Petykiewicz 2019-07-09 20:12:48 -07:00
parent 2acbda4764
commit d462ae9412

View File

@ -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')