diff options
author | gfyoung <gfyoung17@gmail.com> | 2015-12-20 01:08:29 -0800 |
---|---|---|
committer | gfyoung <gfyoung17@gmail.com> | 2015-12-20 01:08:29 -0800 |
commit | 0574f62bf58eada5860fe0620151aede85a8dae4 (patch) | |
tree | 03c72921d245369a4e4042344fe877fc05e8583b | |
parent | 144c34b8ecd051e05a93c6268290eadb1827afb0 (diff) | |
download | numpy-0574f62bf58eada5860fe0620151aede85a8dae4.tar.gz |
MAINT: Remove commented out code blocks
-rw-r--r-- | numpy/distutils/system_info.py | 30 | ||||
-rw-r--r-- | numpy/f2py/auxfuncs.py | 4 | ||||
-rw-r--r-- | numpy/linalg/lapack_lite/clapack_scrub.py | 4 | ||||
-rw-r--r-- | numpy/ma/tests/test_old_ma.py | 58 | ||||
-rw-r--r-- | numpy/testing/noseclasses.py | 12 | ||||
-rw-r--r-- | tools/swig/test/testFortran.py | 10 | ||||
-rw-r--r-- | tools/win32build/misc/x86analysis.py | 9 |
7 files changed, 0 insertions, 127 deletions
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py index bf2762523..dde18dfa5 100644 --- a/numpy/distutils/system_info.py +++ b/numpy/distutils/system_info.py @@ -677,11 +677,6 @@ class system_info(object): exts.append('.dll.a') if sys.platform == 'darwin': exts.append('.dylib') - # Debian and Ubuntu added a g3f suffix to shared library to deal with - # g77 -> gfortran ABI transition - # XXX: disabled, it hides more problem than it solves. - #if sys.platform[:5] == 'linux': - # exts.append('.so.3gf') return exts def check_libs(self, lib_dirs, libs, opt_libs=[]): @@ -995,13 +990,10 @@ class mkl_info(system_info): l = 'mkl' # use shared library if cpu.is_Itanium(): plt = '64' - #l = 'mkl_ipf' elif cpu.is_Xeon(): plt = 'intel64' - #l = 'mkl_intel64' else: plt = '32' - #l = 'mkl_ia32' if l not in self._lib_mkl: self._lib_mkl.insert(0, l) system_info.__init__( @@ -1243,8 +1235,6 @@ class atlas_3_10_blas_info(atlas_3_10_info): class atlas_3_10_threads_info(atlas_3_10_info): dir_env_var = ['PTATLAS', 'ATLAS'] _lib_names = ['tatlas'] - #if sys.platfcorm[:7] == 'freebsd': - ## I don't think freebsd supports 3.10 at this time - 2014 _lib_atlas = _lib_names _lib_lapack = _lib_names @@ -1535,7 +1525,6 @@ class lapack_opt_info(system_info): ('HAVE_CBLAS', None)]) return - #atlas_info = {} ## uncomment for testing need_lapack = 0 need_blas = 0 info = {} @@ -1567,7 +1556,6 @@ class lapack_opt_info(system_info): if need_blas: blas_info = get_info('blas') - #blas_info = {} ## uncomment for testing if blas_info: dict_append(info, **blas_info) else: @@ -1941,13 +1929,6 @@ class _numpy_info(system_info): '"\\"%s\\""' % (vrs)), (self.modulename.upper(), None)] break -## try: -## macros.append( -## (self.modulename.upper()+'_VERSION_HEX', -## hex(vstr2hex(module.__version__))), -## ) -## except Exception as msg: -## print(msg) dict_append(info, define_macros=macros) include_dirs = self.get_include_dirs() inc_dir = None @@ -2322,17 +2303,6 @@ class umfpack_info(system_info): self.set_info(**info) return -## def vstr2hex(version): -## bits = [] -## n = [24,16,8,4,0] -## r = 0 -## for s in version.split('.'): -## r |= int(s) << n[0] -## del n[0] -## return r - -#-------------------------------------------------------------------- - def combine_paths(*args, **kws): """ Return a list of existing paths composed by all combinations of diff --git a/numpy/f2py/auxfuncs.py b/numpy/f2py/auxfuncs.py index 289102e5a..d27b95947 100644 --- a/numpy/f2py/auxfuncs.py +++ b/numpy/f2py/auxfuncs.py @@ -430,9 +430,6 @@ def isintent_nothide(var): def isintent_c(var): return 'c' in var.get('intent', []) -# def isintent_f(var): -# return not isintent_c(var) - def isintent_cache(var): return 'cache' in var.get('intent', []) @@ -673,7 +670,6 @@ def getcallprotoargument(rout, cb_map={}): proto_args = ','.join(arg_types + arg_types2) if not proto_args: proto_args = 'void' - # print(proto_args) return proto_args diff --git a/numpy/linalg/lapack_lite/clapack_scrub.py b/numpy/linalg/lapack_lite/clapack_scrub.py index 9dfee0a84..f3d29aa4e 100644 --- a/numpy/linalg/lapack_lite/clapack_scrub.py +++ b/numpy/linalg/lapack_lite/clapack_scrub.py @@ -13,10 +13,6 @@ class MyScanner(Scanner): Scanner.__init__(self, self.lexicon, info, name) def begin(self, state_name): -# if self.state_name == '': -# print('<default>') -# else: -# print(self.state_name) Scanner.begin(self, state_name) def sep_seq(sequence, sep): diff --git a/numpy/ma/tests/test_old_ma.py b/numpy/ma/tests/test_old_ma.py index d9a93efd4..6ce29cc03 100644 --- a/numpy/ma/tests/test_old_ma.py +++ b/numpy/ma/tests/test_old_ma.py @@ -522,11 +522,6 @@ class TestMa(TestCase): self.assertTrue(str(masked) == '--') self.assertTrue(xx[1] is masked) self.assertEqual(filled(xx[1], 0), 0) - # don't know why these should raise an exception... - #self.assertRaises(Exception, lambda x,y: x+y, masked, masked) - #self.assertRaises(Exception, lambda x,y: x+y, masked, 2) - #self.assertRaises(Exception, lambda x,y: x+y, masked, xx) - #self.assertRaises(Exception, lambda x,y: x+y, xx, masked) def test_testAverage1(self): # Test of average. @@ -681,9 +676,7 @@ class TestUfuncs(TestCase): 'arccosh', 'arctanh', 'absolute', 'fabs', 'negative', - # 'nonzero', 'around', 'floor', 'ceil', - # 'sometrue', 'alltrue', 'logical_not', 'add', 'subtract', 'multiply', 'divide', 'true_divide', 'floor_divide', @@ -754,7 +747,6 @@ class TestArrayMethods(TestCase): self.d = (x, X, XX, m, mx, mX, mXX) - #------------------------------------------------------ def test_trace(self): (x, X, XX, m, mx, mX, mXX,) = self.d mXdiag = mX.diagonal() @@ -825,55 +817,5 @@ def eqmask(m1, m2): return m1 is nomask return (m1 == m2).all() -#def timingTest(): -# for f in [testf, testinplace]: -# for n in [1000,10000,50000]: -# t = testta(n, f) -# t1 = testtb(n, f) -# t2 = testtc(n, f) -# print(f.test_name) -# print("""\ -#n = %7d -#numpy time (ms) %6.1f -#MA maskless ratio %6.1f -#MA masked ratio %6.1f -#""" % (n, t*1000.0, t1/t, t2/t)) - -#def testta(n, f): -# x=np.arange(n) + 1.0 -# tn0 = time.time() -# z = f(x) -# return time.time() - tn0 - -#def testtb(n, f): -# x=arange(n) + 1.0 -# tn0 = time.time() -# z = f(x) -# return time.time() - tn0 - -#def testtc(n, f): -# x=arange(n) + 1.0 -# x[0] = masked -# tn0 = time.time() -# z = f(x) -# return time.time() - tn0 - -#def testf(x): -# for i in range(25): -# y = x **2 + 2.0 * x - 1.0 -# w = x **2 + 1.0 -# z = (y / w) ** 2 -# return z -#testf.test_name = 'Simple arithmetic' - -#def testinplace(x): -# for i in range(25): -# y = x**2 -# y += 2.0*x -# y -= 1.0 -# y /= x -# return y -#testinplace.test_name = 'Inplace operations' - if __name__ == "__main__": run_module_suite() diff --git a/numpy/testing/noseclasses.py b/numpy/testing/noseclasses.py index 4a8e9b0d6..ee9d1b4df 100644 --- a/numpy/testing/noseclasses.py +++ b/numpy/testing/noseclasses.py @@ -34,33 +34,24 @@ class NumpyDocTestFinder(doctest.DocTestFinder): module. """ if module is None: - #print('_fm C1') # dbg return True elif inspect.isfunction(object): - #print('_fm C2') # dbg return module.__dict__ is object.__globals__ elif inspect.isbuiltin(object): - #print('_fm C2-1') # dbg return module.__name__ == object.__module__ elif inspect.isclass(object): - #print('_fm C3') # dbg return module.__name__ == object.__module__ elif inspect.ismethod(object): # This one may be a bug in cython that fails to correctly set the # __module__ attribute of methods, but since the same error is easy # to make by extension code writers, having this safety in place # isn't such a bad idea - #print('_fm C3-1') # dbg return module.__name__ == object.__self__.__class__.__module__ elif inspect.getmodule(object) is not None: - #print('_fm C4') # dbg - #print('C4 mod',module,'obj',object) # dbg return module is inspect.getmodule(object) elif hasattr(object, '__module__'): - #print('_fm C5') # dbg return module.__name__ == object.__module__ elif isinstance(object, property): - #print('_fm C6') # dbg return True # [XX] no way not be sure. else: raise ValueError("object must be a class or function") @@ -95,10 +86,7 @@ class NumpyDocTestFinder(doctest.DocTestFinder): # Look for tests in a class's contained objects. if isclass(obj) and self._recurse: - #print('RECURSE into class:',obj) # dbg for valname, val in obj.__dict__.items(): - #valname1 = '%s.%s' % (name, valname) # dbg - #print('N',name,'VN:',valname,'val:',str(val)[:77]) # dbg # Special handling for staticmethod/classmethod. if isinstance(val, staticmethod): val = getattr(obj, valname) diff --git a/tools/swig/test/testFortran.py b/tools/swig/test/testFortran.py index c77d728e9..b7783be90 100644 --- a/tools/swig/test/testFortran.py +++ b/tools/swig/test/testFortran.py @@ -24,16 +24,6 @@ class FortranTestCase(unittest.TestCase): self.typeStr = "double" self.typeCode = "d" - # This test used to work before the update to avoid deprecated code. Now it - # doesn't work. As best I can tell, it never should have worked, so I am - # commenting it out. --WFS - # def testSecondElementContiguous(self): - # "Test Fortran matrix initialized from reshaped default array" - # print(self.typeStr, "... ", end="", file=sys.stderr) - # second = Fortran.__dict__[self.typeStr + "SecondElement"] - # matrix = np.arange(9).reshape(3, 3).astype(self.typeCode) - # self.assertEquals(second(matrix), 3) - # Test (type* IN_FARRAY2, int DIM1, int DIM2) typemap def testSecondElementFortran(self): "Test Fortran matrix initialized from reshaped NumPy fortranarray" diff --git a/tools/win32build/misc/x86analysis.py b/tools/win32build/misc/x86analysis.py index 0b5586406..870e2c980 100644 --- a/tools/win32build/misc/x86analysis.py +++ b/tools/win32build/misc/x86analysis.py @@ -132,8 +132,6 @@ def cntset(seq): return cnt def main(): - #parser = optparse.OptionParser() - #parser.add_option("-f", "--filename args = sys.argv[1:] filename = args[0] analyse(filename) @@ -146,11 +144,6 @@ def analyse(filename): sse = has_sse(inst) sse2 = has_sse2(inst) sse3 = has_sse3(inst) - #mmx = has_mmx(inst) - #ppro = has_ppro(inst) - #print(sse) - #print(sse2) - #print(sse3) print("SSE3 inst %d" % cntset(sse3)) print("SSE2 inst %d" % cntset(sse2)) print("SSE inst %d" % cntset(sse)) @@ -158,5 +151,3 @@ def analyse(filename): if __name__ == '__main__': main() - #filename = "/usr/lib/sse2/libatlas.a" - ##filename = "/usr/lib/sse2/libcblas.a" |