Skip to content

Commit

Permalink
Move scipy imports so that they don't happen on startup.
Browse files Browse the repository at this point in the history
There seems to be an issue with loading scipy while mantid is
imported in vanilla python. Move the import so that it happens later.
Refs #8373
  • Loading branch information
martyngigg committed Nov 11, 2013
1 parent 0238867 commit 663cafa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
from mantid.api import IFunction1D, FunctionFactory #, BoundaryConstraint
from mantid import logger
import numpy as np
from scipy.fftpack import fft
from scipy.interpolate import interp1d
import copy

from pdb import set_trace as tr
Expand Down Expand Up @@ -98,6 +96,9 @@ def function1D(self, xvals, **optparms):
an extra factor exp(i*pi*E/de) which amounts to alternating sign every
time E increases by de, the energy bin width
'''
from scipy.fftpack import fft
from scipy.interpolate import interp1d

p=self.validateParams()
# override parameter values with optparms (used for the numerical derivative)
if optparms:
Expand Down

0 comments on commit 663cafa

Please sign in to comment.