From cc9d80b913d43922f00c58ce81bf1637300e073f Mon Sep 17 00:00:00 2001
From: Anand Gadiyar <gadiyar@ti.com>
Date: Fri, 5 Apr 2013 16:55:40 +0530
Subject: [PATCH] interpolate: import only the required function to avoid
 namespace conflict

With cxfreeze, trying to freeze an application that uses scipy and numpy,
I ran into the following error.

Traceback (most recent call last):
File "D:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
exec_code in m.__dict__
File "mSimpleGui.py", line 10, in <module>
File "mSystem.py", line 9, in <module>
File "mSensor.py", line 10, in <module>
File "D:\Python27\lib\site-packages\scipy\interpolate\__init__.py", line 154, in <module>
	from rbf import Rbf
File "D:\Python27\lib\site-packages\scipy\interpolate\rbf.py", line 50, in <module>
	from scipy import linalg
ImportError: cannot import name linalg

The patch below fixes this for me.
---
 scipy/interpolate/rbf.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scipy/interpolate/rbf.py b/scipy/interpolate/rbf.py
index 5e6b6f5..6d487cd 100644
--- a/scipy/interpolate/rbf.py
+++ b/scipy/interpolate/rbf.py
@@ -46,7 +46,7 @@ import sys
 
 from numpy import (sqrt, log, asarray, newaxis, all, dot, exp, eye,
                    float_)
-from scipy import linalg
+from scipy.linalg import solve
 
 __all__ = ['Rbf']
 
@@ -198,7 +198,7 @@ class Rbf(object):
             setattr(self, item, value)
 
         self.A = self._init_function(r) - eye(self.N)*self.smooth
-        self.nodes = linalg.solve(self.A, self.di)
+        self.nodes = solve(self.A, self.di)
 
     def _call_norm(self, x1, x2):
         if len(x1.shape) == 1:
-- 
1.7.9.5

