Permalink
Browse files

Started making conversion to newcore

  • Loading branch information...
1 parent 5ebbc98 commit 9f3228810a8088385caa5a6a77c7b839c6723e0d @teoliphant teoliphant committed Oct 2, 2005
Showing with 287 additions and 2,864 deletions.
  1. +2 −2 Lib/__init__.py
  2. +4 −4 Lib/cluster/setup_cluster.py
  3. +1 −1 Lib/cluster/tests/vq_test.py
  4. +2 −2 Lib/cluster/vq.py
  5. +2 −2 Lib/common.py
  6. +4 −4 Lib/cow/cow.py
  7. +2 −2 Lib/cow/setup_cow.py
  8. +1 −1 Lib/fftpack/basic.py
  9. +1 −1 Lib/fftpack/helper.py
  10. +1 −1 Lib/fftpack/pseudo_diffs.py
  11. +4 −4 Lib/fftpack/setup_fftpack.py
  12. +1 −1 Lib/ga/gene.py
  13. +1 −1 Lib/ga/parallel_pop.py
  14. +1 −1 Lib/ga/scaling.py
  15. +1 −1 Lib/ga/selection.py
  16. +2 −2 Lib/ga/setup_ga.py
  17. +0 −88 Lib/gui_thread/__init__.py
  18. +0 −65 Lib/gui_thread/examples.py
  19. +0 −482 Lib/gui_thread/gui_thread_guts.py
  20. +0 −12 Lib/gui_thread/info_gui_thread.py
  21. +0 −350 Lib/gui_thread/main.py
  22. +0 −401 Lib/gui_thread/notes.stx
  23. +0 −18 Lib/gui_thread/setup_gui_thread.py
  24. +0 −353 Lib/gui_thread/tests/test_gui_thread.py
  25. +0 −395 Lib/gui_thread/thread_tests/discussion_archive.txt
  26. +0 −99 Lib/gui_thread/thread_tests/patched_functions_for_import.c
  27. +0 −35 Lib/gui_thread/thread_tests/thread_test.py
  28. +0 −118 Lib/gui_thread/wxBackgroundApp.py
  29. +0 −175 Lib/gui_thread/wxPython_thread.py
  30. +1 −1 Lib/image/color.py
  31. +3 −3 Lib/image/setup_image.py
  32. +1 −1 Lib/image/transforms.py
  33. +2 −2 Lib/integrate/common_routines.py
  34. +1 −1 Lib/integrate/ode.py
  35. +1 −1 Lib/integrate/quadrature.py
  36. +4 −4 Lib/integrate/setup_integrate.py
  37. +2 −2 Lib/interpolate/common_routines.py
  38. +2 −2 Lib/interpolate/fitpack2.py
  39. +3 −3 Lib/interpolate/interpolate.py
  40. +4 −4 Lib/interpolate/setup_interpolate.py
  41. +4 −4 Lib/io/array_import.py
  42. +2 −2 Lib/io/mio.py
  43. +1 −1 Lib/io/mmio.py
  44. +1 −1 Lib/io/numpyiomodule.c
  45. +4 −4 Lib/io/setup_io.py
  46. +1 −1 Lib/io/tests/test_mmio.py
  47. +1 −1 Lib/lib/__init__.py
  48. +4 −4 Lib/lib/blas/setup_blas.py
  49. +1 −1 Lib/lib/blas/tests/test_fblas.py
  50. +4 −4 Lib/lib/lapack/setup_lapack.py
  51. +1 −1 Lib/lib/lapack/tests/esv_tests.py
  52. +1 −1 Lib/lib/lapack/tests/gesv_tests.py
  53. +1 −1 Lib/lib/lapack/tests/test_lapack.py
  54. +2 −2 Lib/lib/setup_lib.py
  55. +19 −19 Lib/linalg/basic.py
  56. +25 −25 Lib/linalg/decomp.py
  57. +1 −1 Lib/linalg/flinalg.py
  58. +1 −1 Lib/linalg/iterative.py
  59. +2 −2 Lib/linalg/matfuncs.py
  60. +2 −2 Lib/linalg/setup_atlas_version.py
  61. +4 −4 Lib/linalg/setup_linalg.py
  62. +5 −5 Lib/linalg/tests/test_basic.py
  63. +2 −2 Lib/linalg/tests/test_decomp.py
  64. +1 −1 Lib/linalg/tests/test_fblas.py
  65. +1 −1 Lib/linalg/tests/test_lapack.py
  66. +2 −2 Lib/linalg/tests/test_matfuncs.py
  67. +6 −6 Lib/optimize/anneal.py
  68. +2 −2 Lib/optimize/common_routines.py
  69. +1 −1 Lib/optimize/lbfgsb.py
  70. +5 −5 Lib/optimize/linesearch.py
  71. +1 −1 Lib/optimize/minpack.py
  72. +6 −6 Lib/optimize/optimize.py
  73. +4 −4 Lib/optimize/setup_optimize.py
  74. +1 −1 Lib/optimize/tnc.py
  75. +3 −3 Lib/pilutil.py
  76. +2 −2 Lib/signal/bsplines.py
  77. +5 −5 Lib/signal/filter_design.py
  78. +1 −1 Lib/signal/firfilter.c
  79. +1 −1 Lib/signal/ltisys.py
  80. +4 −4 Lib/signal/setup_signal.py
  81. +6 −6 Lib/signal/signaltools.py
  82. +1 −1 Lib/signal/sigtoolsmodule.c
  83. +1 −1 Lib/signal/splinemodule.c
  84. +1 −1 Lib/signal/tests/test_signaltools.py
  85. +1 −1 Lib/signal/waveforms.py
  86. +1 −1 Lib/signal/wavelets.py
  87. +3 −3 Lib/sparse/Sparse.py
  88. +4 −4 Lib/sparse/setup_sparse.py
  89. +2 −2 Lib/sparse/tests/test_Sparse.py
  90. +2 −2 Lib/special/_nc_cephesmodule.c
  91. +2 −2 Lib/special/basic.py
  92. +1 −1 Lib/special/cephes.py
  93. +2 −2 Lib/special/orthogonal.py
  94. +9 −9 Lib/special/setup_special.py
  95. +2 −2 Lib/special/tests/test_basic.py
  96. +1 −1 Lib/stats/_support.py
  97. +5 −5 Lib/stats/distributions.py
  98. +1 −1 Lib/stats/kde.py
  99. +3 −3 Lib/stats/morestats.py
  100. +1 −1 Lib/stats/randmodule.c
  101. +2 −2 Lib/stats/rv.py
  102. +4 −4 Lib/stats/setup_stats.py
  103. +5 −5 Lib/stats/stats.py
  104. +2 −2 Lib/stats/tests/test_stats.py
  105. +1 −1 Lib/tests/test_basic.py
  106. +1 −1 Lib/tests/test_basic1a.py
  107. +2 −2 Lib/tests/test_common.py
  108. +2 −2 Lib/tests/test_handy.py
  109. +2 −2 Lib/tests/test_limits.py
  110. +5 −5 Lib/xxx/setup_xxx.py
  111. +14 −0 TOCHANGE.txt
  112. +9 −9 setup.py
View
@@ -8,7 +8,7 @@
"""
# Modules to import under the scipy namespace
from scipy_version import scipy_version as __version__
-from scipy_base import *
+from scipy.base import *
from helpmod import *
_pkg_func_docs = ""
@@ -121,7 +121,7 @@ def _import_packages():
Useful top level commands
===========================
-All commands under scipy_base are also available under scipy itself for convenience
+All commands under scipy.base are also available under scipy itself for convenience
info -- Flexible help utility
source -- Print source for object
@@ -1,11 +1,11 @@
#!/usr/bin/env python
import os
-from scipy_distutils.core import Extension
-from scipy_distutils.misc_util import get_path,default_config_dict,dot_join
+from scipy.distutils.core import Extension
+from scipy.distutils.misc_util import get_path,default_config_dict,dot_join
def configuration(parent_package='',parent_path=None):
- from scipy_distutils.system_info import get_info
+ from scipy.distutils.system_info import get_info
package = 'cluster'
local_path = get_path(__name__,parent_path)
config = default_config_dict(package,parent_package)
@@ -21,7 +21,7 @@ def configuration(parent_package='',parent_path=None):
return config
if __name__ == '__main__':
- from scipy_distutils.core import setup
+ from scipy.distutils.core import setup
setup(maintainer = "SciPy Developers",
author = "eric jones",
maintainer_email = "scipy-dev@scipy.org",
@@ -1,5 +1,5 @@
from Numeric import *
-from scipy_base.scipy_base.fastumath import *
+from scipy.base.scipy.base.fastumath import *
import vq_c as vq
def python_vq(all_data,code_book):
View
@@ -16,10 +16,10 @@
"""
from Numeric import *
-from scipy_base.fastumath import *
+from scipy.base.fastumath import *
import scipy
from scipy.stats import randint
-from scipy_base import common_type as _common_type
+from scipy.base import common_type as _common_type
def whiten(obs):
""" Normalize a group of observations on a per feature basis
View
@@ -6,9 +6,9 @@
import types
from scipy import special, stats, linalg
-import scipy_base.numerix as Numeric
+import scipy.base as Numeric
-from scipy_base import exp, amin, amax, ravel, asarray, cast, arange, \
+from scipy.base import exp, amin, amax, ravel, asarray, cast, arange, \
ones, NewAxis, transpose, hstack, product, array, typename, where, \
zeros, extract, insert, pi, sqrt, eye, poly1d, dot, r_
View
@@ -432,7 +432,7 @@ def load(self):
n0: 0.00, n1: 0.00
"""
import string
- import scipy_distutils.proc as scipy_proc
+ import scipy.distutils.proc as scipy_proc
results = self.load_list()
for i in range(len(self.workers)):
name = string.split(self.workers[i].host,'.')[0]
@@ -506,7 +506,7 @@ def load_list(self):
({'load_5': 0.0, 'load_1': 0.0, 'load_15': 0.0},
{'load_5': 0.0, 'load_1': 0.0, 'load_15': 0.0})
"""
- import scipy_distutils.proc as scipy_proc
+ import scipy.distutils.proc as scipy_proc
res = self.apply(scipy_proc.load_avg,())
return res
@@ -535,7 +535,7 @@ def info_list(self):
n1 2xP3 0.4 192.0 22.0 0.00
"""
- import scipy_distutils.proc as scipy_proc
+ import scipy.distutils.proc as scipy_proc
res = self.apply(scipy_proc.machine_info,())
return res
@@ -604,7 +604,7 @@ def ps_list(self,sort_by='cpu',**filters):
22890 22889 22889 22890 1071 1071 ...
"""
import operator
- import scipy_distutils.proc as scipy_proc
+ import scipy.distutils.proc as scipy_proc
res = self.apply(scipy_proc.ps_list,())
psl = reduce(operator.add,res)
psl = scipy_proc.ps_sort(psl,sort_by,**filters)
View
@@ -1,12 +1,12 @@
#!/usr/bin/env python
-from scipy_distutils.misc_util import default_config_dict
+from scipy.distutils.misc_util import default_config_dict
def configuration(parent_package='',parent_path=None):
package = 'cow'
config = default_config_dict(package,parent_package)
return config
if __name__ == '__main__':
- from scipy_distutils.core import setup
+ from scipy.distutils.core import setup
setup(**configuration())
View
@@ -6,7 +6,7 @@
__all__ = ['fft','ifft','fftn','ifftn','rfft','irfft',
'fft2','ifft2']
-from scipy_base import asarray, zeros, swapaxes
+from scipy.base import asarray, zeros, swapaxes
import _fftpack as fftpack
import atexit
View
@@ -5,7 +5,7 @@
__all__ = ['fftshift','ifftshift','fftfreq','rfftfreq']
-from scipy_base import asarray, concatenate, arange, take, array
+from scipy.base import asarray, concatenate, arange, take, array
import types
def fftshift(x,axes=None):
@@ -8,7 +8,7 @@
'cs_diff','cc_diff','sc_diff','ss_diff',
'shift']
-from scipy_base import pi, asarray, sin, cos, sinh, cosh, tanh
+from scipy.base import pi, asarray, sin, cos, sinh, cosh, tanh
import convolve
import atexit
@@ -6,10 +6,10 @@
from glob import glob
def configuration(parent_package='',parent_path=None):
- from scipy_distutils.core import Extension
- from scipy_distutils.misc_util import get_path,dot_join,\
+ from scipy.distutils.core import Extension
+ from scipy.distutils.misc_util import get_path,dot_join,\
default_config_dict,dict_append
- from scipy_distutils.system_info import get_info,FFTWNotFoundError,\
+ from scipy.distutils.system_info import get_info,FFTWNotFoundError,\
DJBFFTNotFoundError
package_name = 'fftpack'
@@ -62,7 +62,7 @@ def configuration(parent_package='',parent_path=None):
return config
if __name__ == '__main__':
- from scipy_distutils.core import setup
+ from scipy.distutils.core import setup
from fftpack_version import fftpack_version
setup(version=fftpack_version,
View
@@ -303,7 +303,7 @@ def set_value(self,x):
self._value = float(x)
from Numeric import *
-from scipy_base.fastumath import *
+from scipy.base.fastumath import *
class log_float_gene(float_gene):
def __init__(self,bounds):
if len(bounds) !=2: raise GAError, 'float_gene: init expects a 2 element tuple of the fomr (min,max)'
View
@@ -1,5 +1,5 @@
from Numeric import *
-from scipy_base.fastumath import *
+from scipy.base.fastumath import *
import sys, thread, sync
View
@@ -4,7 +4,7 @@
from ga_util import *
import scipy.stats as stats
from Numeric import *
-from scipy_base.fastumath import *
+from scipy.base.fastumath import *
# if a score is less the 2 standard deviations below, the average, its score
# is arbitrarily set to zero
class sigma_truncation_scaling:
View
@@ -6,7 +6,7 @@
stats = rv
import pdb
from Numeric import *
-from scipy_base.fastumath import *
+from scipy.base.fastumath import *
class selector:
def update(self,pop): pass
View
@@ -1,13 +1,13 @@
#!/usr/bin/env python
import os
-from scipy_distutils.misc_util import get_path, default_config_dict
+from scipy.distutils.misc_util import get_path, default_config_dict
def configuration(parent_package='',parent_path=None):
package = 'ga'
config = default_config_dict(package,parent_package)
return config
if __name__ == '__main__':
- from scipy_distutils.core import setup
+ from scipy.distutils.core import setup
setup(**configuration())
View
@@ -1,88 +0,0 @@
-"""
- Allows interpreter and GUI windows to co-exist peacefully.
-
- gui_thread runs wxPython in a back ground thread and allows you
- to create and manipulate wxPython windows from the command line.
-
- NEW WAY:
- An example usage follows::
- >> import gui_thread
- >> gui_thread.start()
- >> from gui_thread.examples import SimpleFrame
- >> a = SimpleFrame()
- >> a.Show(1)
- # a window with a button should pop up...
- >> a.SetTitle('bob')
- >> a.GetTitle()
- 'bob'
- >> a.GetSize()
- (350,200)
- >> a.Blue()
- # window button should have turned blue.
- >> b = SimpleFrame()
- >> b.Show(1)
- # a 2nd window appears
-
- OLD WAY:
- An example usage follows::
- >> import gui_thread
- >> gui_thread.start(use_main=1)
- <wait several seconds while wxPython starts>
- wxPython imported
- >> from gui_thread.examples import SimpleFrame
- >> prxyMyFrame = gui_thread.register(SimpleFrame)
- >> a = prxyMyFrame()
- >> a.Show(1)
- # a window with a button should pop up...
- >> a.SetTitle('bob')
- >> a.GetTitle()
- 'bob'
- >> a.GetSize()
- (350,200)
- >> a.Blue()
- # window button should have turned blue.
- >> b = prxyMyFrame()
- >> b.Show(1)
- # a 2nd window appears
-
- Modules based on gui_thread will also run in wxPython applications
- without modification. So, by using gui_thread, you can create
- viewers for common objects that are usable from the standard
- python interpreter, PythonWin (on MS), and wxPython applications.
- Since Tkinter and wxPython currently do not coexist well together,
- IDLE is not compatible with gui_thread.
-
- gui_thread should always be the first module you import into an
- application, unless it is a wxPython app. In that case, it can
- be imported at any time. When using it in interactive mode, make
- wait until the "wxPython Imported" message appears before importing
- any other modules that use wxPython.
-"""
-
-# New hooks for importing wxPython to its own thread
-from wxPython_thread import wxPython_thread
-
-_use_main = 0
-def start(extra=None,use_main=0):
- global _use_main
- _use_main = use_main
- if _use_main:
- import main
- main.start(extra)
- else:
- wxPython_thread()
- return
-
-def start_up(src_modname,dst_modname,extra=None):
- global _use_main
- if _use_main:
- import main
- main.start_up(src_modname,dst_modname,extra)
- return
-
-def register(wx_class):
- global _use_main
- if _use_main:
- import main
- return main.register(wx_class)
- return wx_class
View
@@ -1,65 +0,0 @@
-import gui_thread
-from wxPython.wx import *
-
-def modal_sample():
- import gui_thread
- prxyDirDialog = gui_thread.register(wxDirDialog)
- q=prxyDirDialog(None)
- q.ShowModal()
-
-class TrackingEvtHandler:
- """ Used occasionly for debugging which handlers are
- connected
- """
- def Connect( self, *arguments, **namedarguments ):
- print 'arguments', arguments, namedarguments
- if not hasattr( self, "__ids" ):
- self.__ids = []
- self.__ids.append( arguments[0] )
- return apply( wxEvtHandler.Connect, (self,)+arguments,namedarguments )
- def ReleaseEventHandlers( self ):
- while self.__ids:
- self.Disconnect( self.__ids[-1] )
- del self.__ids[-1]
-
-#class SimpleFrame(TrackingEvtHandler, wxFrame):
-class SimpleFrame( wxFrame):
- def __init__(self, parent=None, ID=-1, title='no title',
- pos=wxDefaultPosition, size=wxSize(350,200)):
- wxFrame.__init__(self, parent, ID, title, pos, size)
- panel = wxPanel(self, -1)
-
- button = wxButton(panel, 1003, "Close Me")
- button.SetPosition(wxPoint(15, 15))
- self.button = button
- EVT_BUTTON(self, 1003, self.OnCloseMe)
- EVT_CLOSE(self, self.OnCloseWindow)
- # Ah! The next line is ignored. It would seem you must Disconnect
- # events before adding new ones.
- EVT_CLOSE(self, self.OnCloseWindow2)
- self.name = 'bubba'
-
- def Blue(self):
- self.button.SetBackgroundColour(wxBLUE)
-
- def Red(self):
- self.button.SetBackgroundColour(wxRED)
-
- def OnCloseMe(self, event):
- print 'hit'
- self.Close(true)
-
- def OnCloseWindow(self, event):
- print 'first called'
- self.Destroy()
-
- def OnCloseWindow2(self, event):
- print '2nd called'
- self.Destroy()
-
-def non_modal_sample():
- prxySimpleFrame = gui_thread.register(SimpleFrame)
- win = prxySimpleFrame(None, -1, "This is a wxFrame", wxDefaultPosition,
- wxSize(350, 200))
- win.Show(true)
- return win
Oops, something went wrong.

0 comments on commit 9f32288

Please sign in to comment.