From ted_horst@il.us.swissbank.com Tue Dec 3 17:27:55 1996 From: ted_horst@il.us.swissbank.com (Ted Horst) Date: Tue, 3 Dec 96 11:27:55 -0600 Subject: [PYTHON MATRIX-SIG] Solaris dynamic loading probs Message-ID: <9612031728.AA01324@ch1d162nwk> Hi, I am trying to get NumPy to work as a dynamically loaded module on Solaris 2.5.1, and I am having some problems. I am using the SPARCWorks compiler (v 4.1). Configure set the following: SO= .so LDSHARED= ld -G CCSHARED= LINKFORSHARED= I get the follwing error: >>> import multiarray >>> import umath Traceback (innermost last): File "", line 1, in ? ImportError: ld.so.1: ./python: fatal: relocation error: symbol not found: PyOFunc_FromFuncAndData: referenced in Modules/umathmodule.so >>> PyOFunc_FromFuncAndData is in multiarray, which I just loaded. Any clue what I am doing wrong ? Ted Horst ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From Zachary_Roadhouse@brown.edu Tue Dec 3 18:15:20 1996 From: Zachary_Roadhouse@brown.edu (Zachary_Roadhouse@brown.edu) Date: Tue, 03 Dec 1996 13:15:20 -0500 (EST) Subject: [PYTHON MATRIX-SIG] Solaris dynamic loading probs In-Reply-To: <9612031728.AA01324@ch1d162nwk> Message-ID: On 03-Dec-96 Ted Horst wrote: >ImportError: ld.so.1: ./python: fatal: relocation error: symbol not found: >PyOFunc_FromFuncAndData: referenced in Modules/umathmodule.so >>>> You might not be linking in all of the libraries. I have this working under the above platform, when I get into the lab, I'll mail you my configuration if you like. - Zack E-MAIL: Zachary_Roadhouse@brown.edu WEB: http://althor.netspace.org/~zack/ Brown University, Box 220, Providence, RI 02912 Phone: (401) 863 - 5435 ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From chris.chase@jhuapl.edu Wed Dec 4 21:46:05 1996 From: chris.chase@jhuapl.edu (Chris Chase SRM) Date: Wed, 4 Dec 1996 16:46:05 -0500 Subject: [PYTHON MATRIX-SIG] Patches for __array__ (replace bad previous message) In-Reply-To: <9612042135.AA18826@caesar.ifm.uni-kiel.de> References: <9612042135.AA18826@caesar.ifm.uni-kiel.de> Message-ID: <199612042146.QAA14859@grant.jhuapl.edu> I sent an incorrectly produced patch for __array__ in my previous message. I left out the changes for multiarraymodule.c. Below is the correct patch. Chris Chase *** arrayobject.c 1996/11/28 07:10:25 1.1 --- arrayobject.c 1996/11/29 19:13:11 *************** *** 1612,1641 **** } #define ByCopy 1 #define Contiguous 2 ! PyObject *array_fromobject(PyObject *op, int type, int min_depth, int max_depth, int flags) { ! PyObject *r; ! r = NULL; ! if (!PyArray_Check(op) && PyObject_HasAttrString(op, "__array__")) { PyObject *ap, *arglist; if (type == PyArray_NOTYPE) { arglist = Py_BuildValue("()"); } else { arglist = Py_BuildValue("(c)", type); } ! ap = PyObject_GetAttrString(op, "__array__"); ! r = PyEval_CallObject(ap, arglist); Py_DECREF(arglist); ! ! Py_XINCREF(r); ! } ! if (type == PyArray_NOTYPE) { type = PyArray_ObjectType(op, 0); } if (PyArray_Check(op) && (((PyArrayObject *)op)->descr->type_num != PyArray_OBJECT || --- 1612,1646 ---- } #define ByCopy 1 #define Contiguous 2 ! PyObject *array_fromobject(PyObject *op_in, int type, int min_depth, int max_depth, int flags) { ! PyObject *r, *op; ! r = NULL; ! if (!PyArray_Check(op_in) && PyObject_HasAttrString(op_in, "__array__")) { ! /* __array__(self, type=None) method interface ! for getting an object as an array. */ PyObject *ap, *arglist; if (type == PyArray_NOTYPE) { arglist = Py_BuildValue("()"); } else { arglist = Py_BuildValue("(c)", type); } ! ap = PyObject_GetAttrString(op_in, "__array__"); ! op = PyEval_CallObject(ap, arglist); ! Py_DECREF(ap); Py_DECREF(arglist); ! if (op == NULL) return NULL; ! } else { ! op = op_in; ! Py_INCREF(op); ! } ! if (type == PyArray_NOTYPE) { type = PyArray_ObjectType(op, 0); } if (PyArray_Check(op) && (((PyArrayObject *)op)->descr->type_num != PyArray_OBJECT || *************** *** 1648,1673 **** Py_INCREF(op); r = op; } } else { if (type > PyArray_NTYPES) type = PyArray_DescrFromType(type)->type_num; ! if ((r = PyArray_Cast((PyArrayObject *)op, type)) == NULL) return NULL; } } else { r = Array_FromSequence(op, type, min_depth,max_depth); ! if (r == NULL) { ! if (min_depth <= 0) { ! PyErr_Clear(); ! r = PyArray_FromScalar(op, type); ! } else { ! return NULL; ! } } } if (r == NULL) return NULL; ! if(!PyArray_Check(r)) { PyErr_SetString(PyExc_ValueError, "Internal error array_fromobject not producing an array"); return NULL; } if (min_depth != 0 && ((PyArrayObject *)r)->nd < min_depth) { Py_DECREF(r); --- 1653,1677 ---- Py_INCREF(op); r = op; } } else { if (type > PyArray_NTYPES) type = PyArray_DescrFromType(type)->type_num; ! r = PyArray_Cast((PyArrayObject *)op, type); } } else { r = Array_FromSequence(op, type, min_depth,max_depth); ! if (r == NULL && min_depth <= 0) { ! PyErr_Clear(); ! r = PyArray_FromScalar(op, type); } } + /* finished with op */ + Py_DECREF(op); + if (r == NULL) return NULL; ! if (!PyArray_Check(r)) { PyErr_SetString(PyExc_ValueError, "Internal error array_fromobject not producing an array"); return NULL; } if (min_depth != 0 && ((PyArrayObject *)r)->nd < min_depth) { Py_DECREF(r); *** multiarraymodule.c 1996/11/29 20:23:36 1.1 --- multiarraymodule.c 1996/11/29 20:24:03 *************** *** 802,811 **** --- 802,829 ---- + static char doc_asarray[] = "asarray(sequence, typecode=None) same as array() but does not copy if the object provides an array of the correct type. Use this function to ensure that an object is an array without copying."; + + static PyObject * + array_asarray(PyObject *ignored, PyObject *args) + { + PyObject *op, *ret; + char *type = NULL; + + if(PyArg_ParseTuple(args, "O|s", &op, &type) == NULL) return NULL; + + if (type == NULL) { + if ((ret = PyArray_FromObject(op, PyArray_NOTYPE, 0, 0)) == NULL) return NULL; + } else { + if ((ret = PyArray_FromObject(op, (int)*type, 0, 0)) == NULL) return NULL; + } + + return ret; + } static char doc_array[] = "array(sequence, typecode=None) will return a new array formed from the given (potentially nested) sequence and of type given by typecode. If no typecode is given, then the type will be determined as the minimum type required to hold the objects in sequence."; static PyObject * array_array(PyObject *ignored, PyObject *args) *************** *** 1069,1078 **** --- 1087,1097 ---- } static struct PyMethodDef array_module_methods[] = { {"set_print_function", array_set_print_function, 1, doc_set_print_function}, + {"asarray", array_asarray, 1, doc_asarray}, {"array", array_array, 1, doc_array}, {"zeros", array_zeros, 1, doc_zeros}, {"fromstring", array_fromString, 1, doc_fromString}, {"take", array_take, 1, doc_take}, {"reshape", array_reshape, 1, doc_reshape}, *** Numeric/Numeric.py 1996/11/29 20:24:40 1.1 --- Numeric/Numeric.py 1996/11/29 20:25:12 *************** *** 31,40 **** --- 31,41 ---- return m.astype(typecode) else: return m #Include some functions straight from multiarray + asarray = multiarray.asarray array = multiarray.array zeros = multiarray.zeros fromstring = multiarray.fromstring take = multiarray.take reshape = multiarray.reshape *************** *** 235,251 **** def nonzero(a): """Return the indices of the elements of a which are not zero, a must be 1d """ return repeat(arange(len(a)), not_equal(a, 0)) ! def asarray(a, typecode=None): ! if type(a) == arraytype and (typecode == None or typecode == a.typecode()): ! return a ! elif typecode == None: ! return array(a) ! else: ! return array(a, typecode) #Move this into C to do it right! def shape(a): return asarray(a).shape --- 236,252 ---- def nonzero(a): """Return the indices of the elements of a which are not zero, a must be 1d """ return repeat(arange(len(a)), not_equal(a, 0)) ! ## def asarray(a, typecode=None): ! ## if type(a) == arraytype and (typecode == None or typecode == a.typecode()): ! ## return a ! ## elif typecode == None: ! ## return array(a) ! ## else: ! ## return array(a, typecode) #Move this into C to do it right! def shape(a): return asarray(a).shape ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From Zachary_Roadhouse@brown.edu Sat Dec 7 16:49:28 1996 From: Zachary_Roadhouse@brown.edu (Zachary_Roadhouse@brown.edu) Date: Sat, 07 Dec 1996 11:49:28 -0500 (EST) Subject: [PYTHON MATRIX-SIG] Problems compiling 1.0a5 under MkLinux Message-ID: I've recently tried to compile NumPy on my MkLinux machine (Linux on PowerMac kernel 1.2.13). When I attempt to link the python binary, I get the following symbol conflict. Does f2c_lite.c need this function? Can I rename it? I'm guessing that f2c is automatically generated from the fortran source. Can I hack this to get it to work? gcc -O main.o config.o getpath.o \ libModules.a ../Python/libPython.a ../Objects/libObjects.a ../Parser/libParser.a -L/usr/X11R6.1/lib -L/usr/local/lib -ltk4.2 -ltcl7.6 -lX11 -L/usr/lib -lgdbm -lm -lm -lm -o python /usr/lib/libm.a(cabs.o): In function `hypot': cabs.o(.text+0x268): multiple definition of `z_abs' libModules.a(f2c_lite.o)(.text+0x46c): first defined here I've noticed that is is only used in a few places, maybe there is a better name for this. f2c_lite.c:325:double z_abs(z) doublecomplex *z; f2c_lite.c:328:double z_abs(doublecomplex *z) zlapack_lite.c:13946: double d_imag(), z_abs(); zlapack_lite.c:14247: ca = z_abs(&a[ica + i__ * a_dim1]); zlapack_lite.c:14250: ra = z_abs(&a[i__ + (ira + k - 1) * a_dim1]); zlapack_lite.c:20239: double z_abs(), sqrt(); zlapack_lite.c:20349: d__1 = value, d__2 = z_abs(&a[i__ + j * a_dim1]); zlapack_lite.c:20367: sum += z_abs(&a[i__ + j * a_dim1]); zlapack_lite.c:20388: work[i__] += z_abs(&a[i__ + j * a_dim1]); zlapack_lite.c:20740: double z_abs(), sqrt(); zlapack_lite.c:20851: d__1 = value, d__2 = z_abs(&a[i__ + j * a_dim1]); zlapack_lite.c:20867: sum += z_abs(&a[i__ + j * a_dim1]); zlapack_lite.c:20886: work[i__] += z_abs(&a[i__ + j * a_dim1]); - Zack E-MAIL: Zachary_Roadhouse@brown.edu WEB: http://althor.netspace.org/~zack/ Brown University, Box 220, Providence, RI 02912 Phone: (401) 863 - 5435 ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From hinsen@ibs.ibs.fr Mon Dec 9 12:47:46 1996 From: hinsen@ibs.ibs.fr (Konrad Hinsen) Date: Mon, 9 Dec 96 13:47:46 +0100 Subject: [PYTHON MATRIX-SIG] Problems compiling 1.0a5 under MkLinux In-Reply-To: Message-ID: <199612091245.NAA06178@ibs.ibs.fr> > I've recently tried to compile NumPy on my MkLinux machine (Linux on > PowerMac kernel 1.2.13). When I attempt to link the python binary, I > get the following symbol conflict. Does f2c_lite.c need this > function? Can I rename it? I'm guessing that f2c is automatically > generated from the fortran source. Can I hack this to get it to work? f2c_lite.c is a stripped-down version of the Fortran support library that comes with f2c. f2c will generate a call to z_abs if the Fortran program asks for the absolute value of a double complex number, so it is not a good idea to rename this function. What you can probably do (unchecked!) is 1) rename z_abs to something else in f2c_lite.c 2) define a macro z_abs in f2c.h that translates to the new name But you must then be careful to use exactly this version of f2c.h for all Fortran-originated code you plan to link together. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@ibs.ibs.fr Laboratoire de Dynamique Moleculaire | Tel.: +33-4.76.88.99.28 Institut de Biologie Structurale | Fax: +33-4.76.88.54.94 41, av. des Martyrs | Deutsch/Esperanto/English/ 38027 Grenoble Cedex 1, France | Nederlands/Francais ------------------------------------------------------------------------------- ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From djc@lct.com Mon Dec 9 20:56:50 1996 From: djc@lct.com (Duncan Child) Date: Mon, 9 Dec 96 14:56:50 CST Subject: [PYTHON MATRIX-SIG] Data i/o and Numeric module Message-ID: <9612092056.AA02137@ lct.com> Hello, I've read the documentation and can't see a way to load data directly from a file into a Numeric array. I am guessing that if you have a lot of data ( 2000 * 2000 points say ) then it would be better not to incur the overhead of loading the data into a Numeric array via a Python list. The data I need to access is currently either in Fortran binary files or flat ASCII files. Am I right in thinking that it would be better for me to code/use an extension that imports data directly into Numeric arrays rather than an extension to load my data into intermediate Python lists? Is there any documentation or existing code that could act as a template? Thanks a lot for any suggestions, Duncan ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From nigel@maths.su.oz.au Mon Dec 9 23:05:43 1996 From: nigel@maths.su.oz.au (Nigel O'Brian) Date: Tue, 10 Dec 1996 10:05:43 +1100 (EST) Subject: [PYTHON MATRIX-SIG] Data i/o and Numeric module Message-ID: <199612092305.KAA02161@milan.maths.su.oz.au> djc@lct.com (Duncan Child) writes: >> Am I right in thinking that it would be better for me to code/use an >> extension that imports data directly into Numeric arrays rather than an >> extension to load my data into intermediate Python lists? >> Is there any documentation or existing code that could act as a template? The netCDF/python interface might be useful: NetCDF: http://www.unidata.ucar.edu/packages/netcdf/ python interface: http://snow.cit.cornell.edu/noon/ncmodule.html The netCDF datafile format stores large, uniform, data arrays efficiently and avoids byte-order problems when moving binary data between different machines. It is well-documented and looks like a good compromise between simplicity and generality. As well as C, Fortran and Perl interfaces, there is a python interface (fairly early version) to the netcdf library for manipulating these files. The following seems to work OK to read a netcdf array 'pressure' into a NumPy array p -- >> import nc # the netcdf module >> from Numeric import * >> a = nc.open('data.nc', nc.NOWRITE) >> p = array(a.var('pressure')[:]) The 'variable object' constructor a.var() does not appear to create any large intermediate memory overhead. Haven't tried this on a 2000 x 2000 array of doubles however! The version of the Python interface code at the above URL is not NumPy aware, so there must be room for further i/o optimisation. Note: the python code presently also requires Unidata's UDUNITS package to be installed. Nigel -------------------------------------------------------------------- Nigel O'Brian obrian_n@maths.usyd.edu.au School of Mathematics Ph: (02)-9351-4083 University of Sydney FAX: (02)-9351-4534 Sydney NSW 2006, Australia ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From kschalm@geog.ubc.ca Tue Dec 10 02:58:35 1996 From: kschalm@geog.ubc.ca (Kyle Schalm) Date: Mon, 9 Dec 1996 18:58:35 -0800 (PST) Subject: [PYTHON MATRIX-SIG] Data i/o and Numeric module Message-ID: <199612100258.SAA01888@peacock.geog.ubc.ca> >djc@lct.com (Duncan Child) writes: >> Am I right in thinking that it would be better for me to code/use an >> extension that imports data directly into Numeric arrays rather than an >> extension to load my data into intermediate Python lists? >> Is there any documentation or existing code that could act as a template? > The netCDF/python interface might be useful: > > NetCDF: > http://www.unidata.ucar.edu/packages/netcdf/ > python interface: > http://snow.cit.cornell.edu/noon/ncmodule.html > [snippety-snip] > > The version of the Python interface code at the above URL is not NumPy > aware, so there must be room for further i/o optimisation. Note: > the python code presently also requires Unidata's UDUNITS package > to be installed. > there is a numpy-aware version at http://www.geog.ubc.ca/~kschalm this one reads netcdf data right into numpy arrays, without going through lists. one would use the 'get' method of the variable object: import nc # the netcdf module a = nc.open('data.nc', nc.NOWRITE) p = a.var('pressure').get() more details are in the demo at the same location. --Kyle ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From hinsen@ibs.ibs.fr Tue Dec 10 10:01:13 1996 From: hinsen@ibs.ibs.fr (Konrad Hinsen) Date: Tue, 10 Dec 96 11:01:13 +0100 Subject: [PYTHON MATRIX-SIG] Data i/o and Numeric module In-Reply-To: <9612092056.AA02137@ lct.com> (djc@lct.com) Message-ID: <199612100959.KAA11959@ibs.ibs.fr> > I've read the documentation and can't see a way to load data directly > from a file into a Numeric array. I am guessing that if you have a lot > of data ( 2000 * 2000 points say ) then it would be better not to incur > the overhead of loading the data into a Numeric array via a Python list. Indeed. > The data I need to access is currently either in Fortran binary files or > flat ASCII files. I can offer: 1) A Python module that reads ASCII files with numbers into arrays. Slow, but it works. 2) A C module that reads Fortran binary files, with some restrictions: a) It reads one record into one array (one data type). That doesn't work with records that contain, for example, both integers and reals. b) It may not be portable, since the layout of Fortran binary files is compiler dependent. My module uses the layout used by all Unix compilers I know of, but probably it won't work on non-Unix systems. On the plus side, it is as fast as it could possibly be; it reads a whole record into one array with one read statement. Ultimately someone will have to do a fast (i.e. C) module for ASCII I/O of arrays... -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@ibs.ibs.fr Laboratoire de Dynamique Moleculaire | Tel.: +33-4.76.88.99.28 Institut de Biologie Structurale | Fax: +33-4.76.88.54.94 41, av. des Martyrs | Deutsch/Esperanto/English/ 38027 Grenoble Cedex 1, France | Nederlands/Francais ------------------------------------------------------------------------------- ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From djc@lct.com Tue Dec 10 15:30:01 1996 From: djc@lct.com (Duncan Child) Date: Tue, 10 Dec 96 09:30:01 CST Subject: [PYTHON MATRIX-SIG] Data i/o and Numeric module Message-ID: <9612101530.AA05801@ lct.com> Good Morning, > > I've read the documentation and can't see a way to load data directly > > from a file into a Numeric array. Thanks a lot for all your suggestions. I have downloaded the NumPy aware netcdf source and will look at that today. Konrad Hinsen wrote ... > I can offer: > > 1) A Python module that reads ASCII files with numbers into arrays. > Slow, but it works. > > 2) A C module that reads Fortran binary files, with some restrictions: Yes please, I guess that it will be simpler than netcdf and closer to what I am trying to do at the moment. Could you please post it to the matrix-sig or email me the source? > Ultimately someone will have to do a fast (i.e. C) module for ASCII I/O > of arrays... It would be nice to have a more generic solution though I am too new to Python to know what would be required. Regards Duncan ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From hinsen@ibs.ibs.fr Tue Dec 10 17:45:46 1996 From: hinsen@ibs.ibs.fr (Konrad Hinsen) Date: Tue, 10 Dec 96 18:45:46 +0100 Subject: [PYTHON MATRIX-SIG] Data i/o and Numeric module In-Reply-To: <9612101530.AA05801@ lct.com> (djc@lct.com) Message-ID: <199612101745.SAA14931@ibs.ibs.fr> > Yes please, I guess that it will be simpler than netcdf and closer to what > I am trying to do at the moment. Could you please post it to the matrix-sig or > email me the source? I don't think posting is a good idea, but I'll send it to everyone who asks for it... Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@ibs.ibs.fr Laboratoire de Dynamique Moleculaire | Tel.: +33-4.76.88.99.28 Institut de Biologie Structurale | Fax: +33-4.76.88.54.94 41, av. des Martyrs | Deutsch/Esperanto/English/ 38027 Grenoble Cedex 1, France | Nederlands/Francais ------------------------------------------------------------------------------- ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From Jack.Jansen@cwi.nl Mon Dec 16 14:10:46 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Mon, 16 Dec 1996 15:10:46 +0100 Subject: [PYTHON MATRIX-SIG] Routine too big... Message-ID: <9612161410.AA07345=jack@schelvis.cwi.nl> Folks, I'm porting the 1.0a5 distribution of the numeric extension to the Mac, and it all hobbles along nicely with one exception: the 68K compiler doesn't like the routine zlarfx_ from zlapack_lite.c. The routine is apparently bigger than 32Kbyte code, so the compiler cannot generate branch instructions, and there appears to be no way to coerce the compiler to try things differently. Since the routine appears to have general code and special case code for matrixes upto 10x10 I worked around this by commenting out the special case code for the 9x9 and 10x10 cases (and the jumps leading to them, of course, so they'll be handled by the general code). This works, in the sense that the code now compiles. However, knowing next-to-nothing of numerical programming I would like to ask this forum whether my workaround is reasonable or not... -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From pas@lems.brown.edu Mon Dec 16 16:13:13 1996 From: pas@lems.brown.edu (Perry A. Stoll) Date: Mon, 16 Dec 1996 11:13:13 -0500 (EST) Subject: [PYTHON MATRIX-SIG] Routine too big... In-Reply-To: <9612161410.AA07345=jack@schelvis.cwi.nl> Message-ID: On Mon, 16 Dec 1996, Jack Jansen wrote: > I'm porting the 1.0a5 distribution of the numeric extension to the > Mac, Great! > compiler doesn't like the routine zlarfx_ from zlapack_lite.c. The > routine is apparently bigger than 32Kbyte code, so the compiler cannot > generate branch instructions, and there appears to be no way to coerce > the compiler to try things differently. Isn't there an option in the compiler to generate larger offsets? I thought in Think C (at least) there was an option to check off that would do this. The name was something like "LONG offsets" or "Large jump table". I can't help with the implications of commenting out the special cases. not much solid informational-ly yours, -Perry ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From Jack.Jansen@cwi.nl Mon Dec 16 16:44:46 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Mon, 16 Dec 1996 17:44:46 +0100 Subject: [PYTHON MATRIX-SIG] Routine too big... In-Reply-To: Message by "Perry A. Stoll" , Mon, 16 Dec 1996 11:13:13 -0500 (EST) , Message-ID: <9612161644.AA08942=jack@schelvis.cwi.nl> To Perry and Guido, who suggested using a "far" compiler option: sorry, that doesn't work for this problem. That helps when a sourcefile is more than 32k (it makes the compiler use long JSR instructions) but it doesn't help for routines being bigger than 32k. The compiler would have to change things like BEQ foo into BNE *+1 JMP foo and while I know of 68k compilers that can do this trick codewarrior isn't one of them:-( I've also noted that I have to turn off optimization for some files (apparently 128Mb isn't enough memory to optimize dlapack_lite and zlapack_lite), but that should be a minor problem (although you NumPies might think differently about this:-) I'll put the port up for ftp tomorrow or so, once my unix home-directory is back on-line:-( -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From ptaney@usgs.gov Mon Dec 16 17:27:50 1996 From: ptaney@usgs.gov (Paul Taney, Computer Specialist, Reston, VA ) Date: Mon, 16 Dec 1996 12:27:50 -0500 Subject: [PYTHON MATRIX-SIG] Re: Routine too big... Message-ID: <199612161728.MAA22897@srv1rvares.er.usgs.GOV> On Mon, 16 Dec 1996, Jack Jansen wrote: > compiler doesn't like the routine zlarfx_ ... > The routine is apparently bigger than 32Kbyte... >>Isn't there an option in the compiler to generate larger offsets? >>In Think C (at least) there was an option to check off that would >>would do this. See Inside CW8: Setting Mac Project Options: Choosing a Code Model (68K only) p.352 There is a pupup at the top of the Processor Info window where you can select: Small, Smart, or Large. "The large model is useful when you have a source file that generates more than 32K of code or when CW generates an out-of-range link error. This model uses absolute addressing for all function calls. This option corresponds to '#pragma far_code' [but] the factory setting is 'smart'" ptaney@usgs.gov @ Is he who laughs last is he who wins. smail: ms431, reston, va @ Is a foolish dog bark at a flying bird. voice: 703-648-5598 @ One's sheepa must learn, Children, fax: 703-648-5274 @ To respect the Shephard. --Marley ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From Jack.Jansen@cwi.nl Tue Dec 17 11:58:47 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 17 Dec 1996 12:58:47 +0100 Subject: [PYTHON MATRIX-SIG] Numeric Python 1.0a5 for the Mac available Message-ID: <9612171158.AA16973=jack@schelvis.cwi.nl> I've put the Numeric extension modules (both cfm68k and PPC) for MacPython 1.4 in . The distribution has the dynamically loadable modules for both architectures and the python modules, so it should be self-contained. The PPC version has been tested lightly (it passes the selftest and the demo scripts appear to work), the CFM68K version has not been tested at all, due to me lacking a CFM68K-capable machine right now. Please let me know whether things work. Also a question for the matrix-sig people: I've had to make some minor fixes to the sources, whom should I send these to? -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From Jack.Jansen@cwi.nl Tue Dec 17 11:58:47 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 17 Dec 1996 12:58:47 +0100 Subject: [PYTHON MATRIX-SIG] Numeric Python 1.0a5 for the Mac available Message-ID: <9612171158.AA16973=jack@schelvis.cwi.nl> I've put the Numeric extension modules (both cfm68k and PPC) for MacPython 1.4 in . The distribution has the dynamically loadable modules for both architectures and the python modules, so it should be self-contained. The PPC version has been tested lightly (it passes the selftest and the demo scripts appear to work), the CFM68K version has not been tested at all, due to me lacking a CFM68K-capable machine right now. Please let me know whether things work. Also a question for the matrix-sig people: I've had to make some minor fixes to the sources, whom should I send these to? -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From Jack.Jansen@cwi.nl Tue Dec 17 11:58:47 1996 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 17 Dec 1996 12:58:47 +0100 Subject: [PYTHON MATRIX-SIG] Numeric Python 1.0a5 for the Mac available Message-ID: <9612171158.AA16973=jack@schelvis.cwi.nl> I've put the Numeric extension modules (both cfm68k and PPC) for MacPython 1.4 in . The distribution has the dynamically loadable modules for both architectures and the python modules, so it should be self-contained. The PPC version has been tested lightly (it passes the selftest and the demo scripts appear to work), the CFM68K version has not been tested at all, due to me lacking a CFM68K-capable machine right now. Please let me know whether things work. Also a question for the matrix-sig people: I've had to make some minor fixes to the sources, whom should I send these to? -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From hugunin@mit.edu Thu Dec 19 17:30:08 1996 From: hugunin@mit.edu (Jim Hugunin) Date: Thu, 19 Dec 1996 12:30:08 -0500 Subject: [PYTHON MATRIX-SIG] Version 1.0alpha6 (compatible with Python1.4 final) is available Message-ID: <9612191729.AA17965@goldilocks.LCS.MIT.EDU> I've been completely unable to give any attention to Numeric Python for the last two months. I've been rather sick for most of that time and I've been spending the time I've been healthy desperately working to not fall too far behind in my most critical projects. So, I'm sorry I've been gone for so long, but there wasn't a whole lot I could do about it. This should also not be taken as a sign that I'm back for any lengthy stay. I'll be going home for the holidays starting this Saturday and returning January 5th. Hopefully after that I'll have some time for this project again. Anyway, before I completely disappear I thought that I should at least produce a Numeric Python distribution that will work with the latest version of Python1.4 Final. Well, that's the alpha6 release. This release only deals with one or two of the bug reports I received on the alpha5 version. The other bugs will have to wait until I have the time to look into them in January. Another warning - I haven't had the chance to test this on any Unix systems. I know that it works on my Windows NT developement platform, and it should work on all Unix boxes as before. You can get the new distribution at: http://www.sls.lcs.mit.edu/~jjh/numpy Notice that this is not yet a beta release. Nonetheless, I'm very confident that the interface is not going to be changing in any significant incompatible ways from alpha6. The only reason I'm refraining from calling this the beta 1 release is the set of known bugs. When I can squash those I'll be ready for something more public. As always, enjoy - Jim ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From hinsen@ibs.ibs.fr Thu Dec 19 19:41:14 1996 From: hinsen@ibs.ibs.fr (Konrad Hinsen) Date: Thu, 19 Dec 1996 20:41:14 +0100 Subject: [PYTHON MATRIX-SIG] Version 1.0alpha6 (compatible with Python1.4 final) is available In-Reply-To: <9612191729.AA17965@goldilocks.LCS.MIT.EDU> (hugunin@mit.edu) Message-ID: <199612191941.UAA12992@lmspc1.ibs.fr> > behind in my most critical projects. So, I'm sorry I've been gone for so > long, but there wasn't a whole lot I could do about it. Well, it's good to have you back. I was already worried that you might have defected to Perl ;-) > Anyway, before I completely disappear I thought that I should at least > produce a Numeric Python distribution that will work with the latest > version of Python1.4 Final. Well, that's the alpha6 release. This release And just in time as a christmas present! ;-) I'll put it on my laptop and leave too - more news next year... Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@ibs.ibs.fr Laboratoire de Dynamique Moleculaire | Tel.: +33-4.76.88.99.28 Institut de Biologie Structurale | Fax: +33-4.76.88.54.94 41, av. des Martyrs | Deutsch/Esperanto/English/ 38027 Grenoble Cedex 1, France | Nederlands/Francais ------------------------------------------------------------------------------- ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org ================= From dwhall@ksu.edu Fri Dec 20 21:24:32 1996 From: dwhall@ksu.edu (Dean W Hall) Date: Fri, 20 Dec 1996 15:24:32 -0600 Subject: [PYTHON MATRIX-SIG] project: wrapping the UBC wavelet transforms Message-ID: <32BB0410.493D3548@ksu.edu> Hello, I'm in the middle of doing something that both the numerical and image people might find interesting. I hope I'm not repeating any work. I've been wanting to fiddle with wavelets for a while now. So I found the UBC Imager Wavelet Package -- Release 2.1 (written in C) It works nicely, but I need the prototyping of Python. So I took the SWIG package and made some wrappers for it! I have the wrapper file made cleanly (though I can't attest for properness, yet). I am now trying to link it to make the wvlt.so library file... I've mailed the auther of SWIG to help me with the linking. Hopefully, I'll have a nice wavelet filter module that I can contribute to the numerical gang, which could be used by the imaging folks (and others)! happy hollidays, !!Dean ================= MATRIX-SIG - SIG on Matrix Math for Python send messages to: matrix-sig@python.org administrivia to: matrix-sig-request@python.org =================