From be4289daffd05e0774d304dbbbaeae39babe1d43 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 3 Jan 2019 09:07:51 -0600 Subject: [PATCH] Tweak object array treatment in separate_by_real_and_imag --- meshmode/discretization/visualization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshmode/discretization/visualization.py b/meshmode/discretization/visualization.py index 704ef1bd..a414165b 100644 --- a/meshmode/discretization/visualization.py +++ b/meshmode/discretization/visualization.py @@ -41,10 +41,10 @@ __doc__ = """ def separate_by_real_and_imag(data, real_only): for name, field in data: - from pytools.obj_array import log_shape + from pytools.obj_array import log_shape, is_obj_array ls = log_shape(field) - if ls != () and ls[0] > 1: + if is_obj_array(field): assert len(ls) == 1 from pytools.obj_array import ( oarray_real_copy, oarray_imag_copy, -- GitLab