From dc262fd89c118c8b2c31605e84f903f927e2f175 Mon Sep 17 00:00:00 2001 From: "Joern Ungermann (IEK-7 FZ-Juelich)" <j.ungermann@fz-juelich.de> Date: Thu, 30 Oct 2014 12:21:52 +0100 Subject: [PATCH] moved import of uncommon libraries into routines requiring them. --- pyramid/magdata.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyramid/magdata.py b/pyramid/magdata.py index b54ead2..b2460ea 100644 --- a/pyramid/magdata.py +++ b/pyramid/magdata.py @@ -11,9 +11,6 @@ from scipy.ndimage.interpolation import zoom import matplotlib.pyplot as plt import matplotlib.cm as cmx from matplotlib.ticker import MaxNLocator -from mayavi import mlab - -from lxml import etree from numbers import Number @@ -519,6 +516,8 @@ class MagData(object): ''' self.LOG.debug('Calling quiver_plot3D') + from mayavi import mlab + a = self.a dim = self.dim # Create points and vector components as lists: @@ -553,6 +552,8 @@ class MagData(object): ''' self.LOG.debug('Calling save_to_x3d') + from lxml import etree + dim = self.dim # Create points and vector components as lists: zz, yy, xx = np.mgrid[0.5:(dim[0]-0.5):dim[0]*1j, -- GitLab