On Thu, 2004-11-18 at 10:53, Andrew Straw wrote:
Hi all,
Hi Andrew, sorry about not getting back to this sooner. I actually committed this some time last week but forgot to follow up on the e-mail. Anyway, well done. Patches that work are one of my favorite things.
Here's a patch for numarray (against current CVS) to build using Apple's vecLib (optimized BLAS library) on Mac OS X. This was inspired by/stolen from Bob Ippolito's recent Numeric patch ( http://mail.python.org/pipermail/pythonmac-sig/2004-November/ 012077.html ). To build with vecLib, set the environment variable USE_LAPACK=1. I can test any modifications needed to incorporate this into the main release. After building with this patch (both with and without vecLib) I ran Lib/testall.py with no problems -- are there more tests I should do?
No. All of the self-tests for numarray, with the exception of the f2py support, are integrated into numarray.testall. The tests can always be improved, but they are intended to be centralized so that should always be the only place you have to look. Thanks again for the patch. Regards, Todd
Cheers! Andrew
Index: addons.py =================================================================== RCS file: /cvsroot/numpy/numarray/addons.py,v retrieving revision 1.8 diff -c -r1.8 addons.py *** addons.py 3 Nov 2004 15:06:33 -0000 1.8 --- addons.py 18 Nov 2004 15:43:01 -0000 *************** *** 24,31 **** --- 24,33 ---- os.path.join('Packages/LinearAlgebra2/Src', 'zlapack_lite.c'), os.path.join('Packages/LinearAlgebra2/Src', 'dlapack_lite.c') ] + lapack_include_dirs = ["Packages/LinearAlgebra2/Src", 'Include/numarray'] lapack_libs = [] lapack_dirs = [] + lapack_link_args = [] else: sourcelist = [ os.path.join('Packages/LinearAlgebra2/Src', 'lapack_litemodule.c'), *************** *** 53,58 **** --- 55,70 ----
# lapack_dirs = ['/home/jmiller/work/lib']
+ lapack_link_args = [] + lapack_include_dirs = ["Packages/LinearAlgebra2/Src", 'Include/numarray'] + + VECLIB_PATH = '/System/Library/Frameworks/vecLib.framework' + if os.path.exists(VECLIB_PATH): + lapack_link_args = ['-framework', 'vecLib'] + lapack_include_dirs.append( os.path.join(VECLIB_PATH, 'Headers')) + lapack_libs = [] + lapack_dirs = [] + ADDONS_DATA_FILES = [('numarray/ma', ['Packages/MA/Legal.htm'])]
ADDONS_PACKAGES = ["numarray.convolve", *************** *** 102,110 **** include_dirs = ['Packages/FFT2/Include','Include/numarray']), Extension('numarray.linear_algebra.lapack_lite2', sourcelist, ! include_dirs = ["Packages/LinearAlgebra2/Src", 'Include/numarray'], library_dirs = lapack_dirs, ! libraries = lapack_libs), Extension("numarray.random_array.ranlib2", ["Packages/RandomArray2/Src/ranlib.c", "Packages/RandomArray2/Src/ranlibmodule.c", --- 114,124 ---- include_dirs = ['Packages/FFT2/Include','Include/numarray']), Extension('numarray.linear_algebra.lapack_lite2', sourcelist, ! include_dirs = lapack_include_dirs, library_dirs = lapack_dirs, ! libraries = lapack_libs, ! extra_link_args = lapack_link_args, ! ), Extension("numarray.random_array.ranlib2", ["Packages/RandomArray2/Src/ranlib.c", "Packages/RandomArray2/Src/ranlibmodule.c",
------------------------------------------------------- This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
--