You can subscribe to this list here.
2000 |
Jan
(8) |
Feb
(49) |
Mar
(48) |
Apr
(28) |
May
(37) |
Jun
(28) |
Jul
(16) |
Aug
(16) |
Sep
(44) |
Oct
(61) |
Nov
(31) |
Dec
(24) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(56) |
Feb
(54) |
Mar
(41) |
Apr
(71) |
May
(48) |
Jun
(32) |
Jul
(53) |
Aug
(91) |
Sep
(56) |
Oct
(33) |
Nov
(81) |
Dec
(54) |
2002 |
Jan
(72) |
Feb
(37) |
Mar
(126) |
Apr
(62) |
May
(34) |
Jun
(124) |
Jul
(36) |
Aug
(34) |
Sep
(60) |
Oct
(37) |
Nov
(23) |
Dec
(104) |
2003 |
Jan
(110) |
Feb
(73) |
Mar
(42) |
Apr
(8) |
May
(76) |
Jun
(14) |
Jul
(52) |
Aug
(26) |
Sep
(108) |
Oct
(82) |
Nov
(89) |
Dec
(94) |
2004 |
Jan
(117) |
Feb
(86) |
Mar
(75) |
Apr
(55) |
May
(75) |
Jun
(160) |
Jul
(152) |
Aug
(86) |
Sep
(75) |
Oct
(134) |
Nov
(62) |
Dec
(60) |
2005 |
Jan
(187) |
Feb
(318) |
Mar
(296) |
Apr
(205) |
May
(84) |
Jun
(63) |
Jul
(122) |
Aug
(59) |
Sep
(66) |
Oct
(148) |
Nov
(120) |
Dec
(70) |
2006 |
Jan
(460) |
Feb
(683) |
Mar
(589) |
Apr
(559) |
May
(445) |
Jun
(712) |
Jul
(815) |
Aug
(663) |
Sep
(559) |
Oct
(930) |
Nov
(373) |
Dec
|
From: Jim K. <jek...@kl...> - 2006-08-10 00:47:44
|
Jim Kleckner wrote: > It seems that this old problem of compiling Numeric is a problem again > (even on my Linux box, not just cygwin): > http://sourceforge.net/tracker/index.php?func=detail&aid=732520&group_id=1369&atid=301369 > > > (The issue was the dlamch.f code) > > The patch recommended to run: > python setup.py config > in order to work around the problem. > > Note that this no longer runs and gives the error message: > unable to execute _configtest.exe: No such file or directory > > > The setup.py and customize.py code interact in complex ways with > Python's build tools. > > Anyone out there familiar with these and what is going on? > > BTW, it looks as though the default Makefile in python2.4/config dir now > has -O3 turned on which is stimulating this problem. > > Jim > A workaround for this problem in setup.py is to run this simple script to create the config.h file that is failing (probably due to the compile flags): gcc -fno-strict-aliasing -DNDEBUG -g -Wall -Wstrict-prototypes -IInclude -IPackages/FFT/Include -IPackages/RNG/Include -I/usr/include/python2.4 Src/config.c -o mkconfigh ./mkconfigh mv config.h Src |
From: Jim K. <jek...@kl...> - 2006-08-10 00:19:00
|
It seems that this old problem of compiling Numeric is a problem again (even on my Linux box, not just cygwin): http://sourceforge.net/tracker/index.php?func=detail&aid=732520&group_id=1369&atid=301369 (The issue was the dlamch.f code) The patch recommended to run: python setup.py config in order to work around the problem. Note that this no longer runs and gives the error message: unable to execute _configtest.exe: No such file or directory The setup.py and customize.py code interact in complex ways with Python's build tools. Anyone out there familiar with these and what is going on? BTW, it looks as though the default Makefile in python2.4/config dir now has -O3 turned on which is stimulating this problem. Jim |
From: Sebastian H. <ha...@ms...> - 2006-08-09 22:41:01
|
On Wednesday 09 August 2006 15:18, Travis Oliphant wrote: > Sebastian Haase wrote: > > Hi! > > I have a problem with record array type descriptor. > > With numarray this used to work. > > My records made of n integers and m floats. So I used to be able > > specify formats="%di4,%df4"%(self.numInts,self.numFloats) in numarray > > which would translate to > > byteorder = self.isByteSwapped and '>' or '<' > > type_descr = [("int", "%s%di4" %(byteorder,self.numInts)), > > ("float", "%s%df4" %(byteorder,self.numFloats))] > > > > The problem occurs when numInts or numFloats is zero !? > > Could it numpy be changed to silectly accept this case > > Here is the complete traceback + some debug info: > > If numarray supported it, then we should get NumPy to support it as well > unless there is a compelling reason not to. I can't think of any except > that it might be hard to make it work. What is '0i4' supposed to mean > exactly? Do you get a zero-sized field or is the field not included? > I think the former will be much easier than the latter. Would that be > O.K.? That's exactly what numarray did. The rest of my code is assuming that all fields exist (even if they are empty). Otherwise I get a name error which is worse than getting an empty array. Thanks, Sebastian Haase |
From: Travis O. <oli...@ie...> - 2006-08-09 22:18:17
|
Sebastian Haase wrote: > Hi! > I have a problem with record array type descriptor. > With numarray this used to work. > My records made of n integers and m floats. So I used to be able specify > formats="%di4,%df4"%(self.numInts,self.numFloats) in numarray which would > translate to > byteorder = self.isByteSwapped and '>' or '<' > type_descr = [("int", "%s%di4" %(byteorder,self.numInts)), > ("float", "%s%df4" %(byteorder,self.numFloats))] > > The problem occurs when numInts or numFloats is zero !? > Could it numpy be changed to silectly accept this case > Here is the complete traceback + some debug info: > If numarray supported it, then we should get NumPy to support it as well unless there is a compelling reason not to. I can't think of any except that it might be hard to make it work. What is '0i4' supposed to mean exactly? Do you get a zero-sized field or is the field not included? I think the former will be much easier than the latter. Would that be O.K.? -Travis |
From: Travis O. <oli...@ie...> - 2006-08-09 22:11:56
|
Matthew Brett wrote: > Hi, > > Sorry if this is silly question, but should this work to convert from > int8 to character type? > > a = array([104, 105], dtype=N.int8) > a.astype('|S1') > I'm not sure what you are trying to do here, but the standard coercion to strings will generate ['104', '105']. However you are only allowing 1 character strings so you get the first character. If you are wanting to get characters with ASCII codes 104 and 105 you can do that without coercion by simply viewing the memory as a different data-type: a.view('S1') array([h, i], dtype='|S1') -Travis |
From: Sebastian H. <ha...@ms...> - 2006-08-09 21:02:16
|
Hi! I have a problem with record array type descriptor. With numarray this used to work. My records made of n integers and m floats. So I used to be able specify formats="%di4,%df4"%(self.numInts,self.numFloats) in numarray which would translate to byteorder = self.isByteSwapped and '>' or '<' type_descr = [("int", "%s%di4" %(byteorder,self.numInts)), ("float", "%s%df4" %(byteorder,self.numFloats))] The problem occurs when numInts or numFloats is zero !? Could it numpy be changed to silectly accept this case Here is the complete traceback + some debug info: '>0i4'Traceback (most recent call last): File "<stdin>", line 1, in ? File "/home/haase/PrLinN/Priithon/Mrc.py", line 56, in bindFile a = Mrc(fn, mode) File "/home/haase/PrLinN/Priithon/Mrc.py", line 204, in __init__ self.doExtHdrMap() File "/home/haase/PrLinN/Priithon/Mrc.py", line 271, in doExtHdrMap self.extHdrArray.dtype = type_descr File "/home/haase/qqq/lib/python/numpy/core/records.py", line 194, in __setattr__ return object.__setattr__(self, attr, val) TypeError: invalid data-type for array >>> U.debug() > /home/haase/qqq/lib/python/numpy/core/records.py(196)__setattr__() -> pass (Pdb) l 191 192 def __setattr__(self, attr, val): 193 try: 194 return object.__setattr__(self, attr, val) 195 except AttributeError: # Must be a fieldname 196 -> pass 197 fielddict = sb.ndarray.__getattribute__(self,'dtype').fields 198 try: 199 res = fielddict[attr][:2] 200 except (TypeError,KeyError): 201 raise AttributeError, "record array has no attribute %s" % attr (Pdb) p val [('int', '>0i4'), ('float', '>2f4')] (Pdb) p attr 'dtype' Thanks, Sebastian Haase |
From: Sebastian H. <ha...@ms...> - 2006-08-09 16:54:05
|
Hi, we are using numerical python as an integral part of a microscope development project over last few years. So far we have been using exclusively numarray but now I decided it's time to slowly but sure migrate to numpy. What is the proper way to reference these packages ? Thanks to everyone involved, Sebastian Haase UCSF |
From: David H. <dav...@gm...> - 2006-08-09 14:35:50
|
I started to do the same with array methods, but before I spend too much time on it, I'd like to be sure I'm doing the right thing. 1. In add_newdocs.py, add from numpy.core import ndarray 2. then add an entry for each method, eg add_docstring(ndarray.var, """a.var(axis=None, dtype=None) Return the variance, a measure of the spread of a distribution. The variance is the average of the squared deviations from the mean, i.e. var = mean((x - x.mean())**2). See also: std """) 3. in arraymethods.c, delete static char doc_var[] = ... remove doc_var in {"var", (PyCFunction)array_variance, METH_VARARGS|METH_KEYWORDS, doc_var}, David 2006/7/28, Sasha <nd...@ma...>: > > On 7/28/06, Stefan van der Walt <st...@su...> wrote: > > > Would anyone mind if the change was made? If not, where should they > > go? (numpy/add_newdocs.py or numpy/core/something) > > Another +1 for numpy/add_newdocs.py and a suggestion: check for > Py_OptimizeFlag > 1 in add_newdoc so that docstrings are not loaded if > python is invoked with -OO option. This will improve import numpy > time and reduce the memory footprint. I'll make the change if no one > objects. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > |
From: Benjamin T. <ben...@de...> - 2006-08-09 08:28:13
|
Le Mardi 8 Ao=FBt 2006 05:18, Bill Baxter a =E9crit=A0: > I see Pyrex and SWIG examples in numpy/doc but there doesn't seem to be an > example of just a simple straightforward usage of the C-API. > For instance make a few arrays by hand in C and then call numpy.multiply() > on them. So far my attempts to call PyArray_SimpleNewFromData all result > in segfaults. > Anyone have such an example? > > --Bill =46or our neuroimagery lib, i had to write some simples straightforward wra= ppers=20 to the C-lib GSL, which you might be interested to have a quick look..=20 Trac entry: http://projects.scipy.org/neuroimaging/ni/browser/fff/trunk/bindings/lightw= rappers.h http://projects.scipy.org/neuroimaging/ni/browser/fff/trunk/bindings/lightw= rappers.c and half-commented example usage.. http://projects.scipy.org/neuroimaging/ni/browser/fff/trunk/pythonTests/fff= ctests/lightmoduleExample.c =2D- Benjamin Thyreau CEA Orsay |
From: David C. <da...@ar...> - 2006-08-09 02:54:57
|
Darren Dale wrote: > On Tuesday 08 August 2006 17:02, George Gumas wrote: > >> I downloaded numpy 10000 and matplotlib and when running numpy i get the >> error message below >> from matplotlib._ns_cntr import * >> RuntimeError: module compiled against version 90709 of C-API but this >> version of numpy is 1000000 >> >> This error may happen if you forgot to rebuild all matplotlib against the new numpy. Did you try recompiling everything by removing the build directory of matplotlib ? David |
From: Robert K. <rob...@gm...> - 2006-08-09 02:12:16
|
Albert Strasheim wrote: > Comments appreciated. Someone checking something along these lines into SVN > appreciated more. A solution that doesn't make me want to cry appreciated > most. > P.S. As it happens, the OOF2 guys have already created a SharedLibrary > builder for distutils, but integrating this into numpy.distutils is probably > non-trivial. > > http://www.ctcms.nist.gov/oof/oof2.html I recommend using OOF2's stuff, not the .pyd hack. The latter makes *me* want to cry. If you come up with a patch, post it to the numpy Trac, and I'll check it in. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
From: Robert K. <rob...@gm...> - 2006-08-09 02:02:12
|
Andrew Straw wrote: > Back to your email: I don't understand why you're trying to build a > shared library with distutils. What's wrong with a plain old c-compiler > and linker (and mt.exe if you're using MS VC 8)? You can build shared > libraries this way with Makefiles, scons, Visual Studio, and about a > billion other solutions that have evolved since early C days. I can > understand the desire of getting "python setup.py install" to work, but > I suspect spawning an appropriate subprocess to do the compilation would > be easier and more robust than attempting to get distutils to do > something it's not designed for. (Then again, to see what numpy > distutils can do, well, let's just say I'm amazed.) Along these lines, I > noticed that ctypes-itself seems to have put some hooks into setup.py to > perform at least part of the configure/make dance on linux, although I > haven't investigated any further yet. Perhaps that's a better way to go > than bending distutils to your will? Well, wrapper he's writing destined for scipy, so "python setup.py build" must work. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
From: Matthew B. <mat...@gm...> - 2006-08-09 01:52:15
|
Hi, Sorry if this is silly question, but should this work to convert from int8 to character type? a = array([104, 105], dtype=N.int8) a.astype('|S1') I was a bit surprised by the output: array([1, 1], dtype='|S1') Thanks a lot, Matthew |
From: Andrew S. <str...@as...> - 2006-08-09 01:52:13
|
Dear Albert, I have started to use numpy and ctypes together and I've been quite pleased. Thanks for your efforts and writings on the wiki. On the topic of ctypes but not directly following from your email: I noticed immediately that the .ctypes attribute of an array is going to be a de-facto array interface, and wondered whether it would actually be better to write some code that takes the __array_struct__ interface and exposes that as an object with ctypes-providing attributes. This way, it could be used by all software exposing the __array_struct__ interface. Still, even with today's implementation, this could be acheived with numpy.asarray( my_array_struct_object ).ctypes. Back to your email: I don't understand why you're trying to build a shared library with distutils. What's wrong with a plain old c-compiler and linker (and mt.exe if you're using MS VC 8)? You can build shared libraries this way with Makefiles, scons, Visual Studio, and about a billion other solutions that have evolved since early C days. I can understand the desire of getting "python setup.py install" to work, but I suspect spawning an appropriate subprocess to do the compilation would be easier and more robust than attempting to get distutils to do something it's not designed for. (Then again, to see what numpy distutils can do, well, let's just say I'm amazed.) Along these lines, I noticed that ctypes-itself seems to have put some hooks into setup.py to perform at least part of the configure/make dance on linux, although I haven't investigated any further yet. Perhaps that's a better way to go than bending distutils to your will? Finally, the ctypes_load_library() function was broken for me and so I just ended up using the appropriate ctypes calls directly. (I should report this bug, I know, and I haven't yet... Bad Andrew.) But the bigger issue for me is that this is a ctypes-level convenience function, and I can't see why it should be in numpy. Is there any reason it should go in numpy and not into ctypes itself where it would surely receive more review and widespread use if it's useful? Albert Strasheim wrote: >Hello all > >With the nice ctypes integration in NumPy, and with Python 2.5 which will >include ctypes around the corner, a remote possibility exists that within >the next year or two, I might not be the only person that wants to use NumPy >with ctypes. > >This is probably going to mean that this someone is going to want to build a >shared library for use with ctypes. This is all well and good if you're >using a build tool that knows about shared libraries, but in case this >person is stuck with distutils, here is what we might want to do. > >Following this thread from SciPy-dev: > >http://projects.scipy.org/pipermail/scipy-dev/2006-April/005708.html > >I came up with the following plan. > >As it happens, pretending your shared library is a Python extension mostly >works. In your setup.py you can do something like this: > >config = Configuration(package_name,parent_package,top_path) >config.add_extension('libsvm_', > define_macros=[('LIBSVM_EXPORTS', None), > ('LIBSVM_DLL', None)], > sources=[join('libsvm-2.82', 'svm.cpp')], > depends=[join('libsvm-2.82', 'svm.h')]) > >First caveat: on Windows, distutils forces the linker to look for an >exported symbol called init<yourextensionname>. In your code you'll have to >add an empty function like this: > >void initlibsvm_() {} > >This gets us a compiled Python extension, which also happens to be a shared >library on every platform I know of, which is Linux and Windows. >Counter-examples anyone?. > >Next caveat: on Windows, shared libraries aka DLLs, typically have a .dll >extension. However, Python extensions have a .pyd extension. > >We have a utility function in NumPy called ctypes_load_library which handles >finding and loading of shared libraries with ctypes. Currently, shared >library extensions (.dll, .so, .dylib) are hardcoded in this function. > >I propose we modify this function to look something like this: > >def ctypes_load_library(libname, loader_path, distutils_hack=False): > ... > >If distutils_hack is True, instead of the default mechanism (which is >currently hardcoded extensions), ctypes_load_library should do: > >import distutils.config >so_ext = distutils.sysconfig.get_config_var('SO') > >to figure out the extension it should use to load shared libraries. This >should make it reasonably easy for people to build shared libraries with >distutils and use them with NumPy and ctypes. > >Comments appreciated. Someone checking something along these lines into SVN >appreciated more. A solution that doesn't make me want to cry appreciated >most. > >Thanks for reading. > >Regards, > >Albert > >P.S. As it happens, the OOF2 guys have already created a SharedLibrary >builder for distutils, but integrating this into numpy.distutils is probably >non-trivial. > >http://www.ctcms.nist.gov/oof/oof2.html > > > >------------------------------------------------------------------------- >Using Tomcat but need to do more? Need to support web services, security? >Get stuff done quickly with pre-integrated technology to make your job easier >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >_______________________________________________ >Numpy-discussion mailing list >Num...@li... >https://lists.sourceforge.net/lists/listinfo/numpy-discussion > > |
From: Robert K. <rob...@gm...> - 2006-08-09 01:47:13
|
Bill Baxter wrote: > Wouldn't it make more sense to just rename the .pyd generated by > distutils to .dll or .so? Especially since the .pyd generated by > distutils won't actually be a python extension module. This renaming > could be automated by a simple python script that wraps distutils. The > addition of the init{modulename} function could also be done by that > script. The strategy of "post-processing" after the setup() is not really robust. I've encountered a number of packages that try to things like that, and I've never had one work right. And no, it won't solve the init{modulename} problem, either. It's a problem that occurs at build-time, not import-time. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
From: Charlie M. <cw...@gm...> - 2006-08-09 00:52:09
|
We're waiting on some possible changes in the numpy c-api before scipy. Hopefully we will have a working release in the next week. On 8/8/06, Bill Baxter <wb...@gm...> wrote: > Matplotlib needs to be recompiled against the latest Numpy. > They should release a new version compatible with Numpy 1.0 beta soon. > --bb > > > On 8/9/06, George Gumas <gg...@gm...> wrote: > > > > I downloaded numpy 10000 and matplotlib and when running numpy i get the > error message below > from matplotlib._ns_cntr import * > RuntimeError: module compiled against version 90709 of C-API but this > version of numpy is 1000000 > > How do I go about chaning the version of rither numpy or matplotlib > > Thanks > George > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > > > |
From: Bill B. <wb...@gm...> - 2006-08-09 00:22:38
|
On 8/9/06, Albert Strasheim <fu...@gm...> wrote: > > Next caveat: on Windows, shared libraries aka DLLs, typically have a .dll > extension. However, Python extensions have a .pyd extension. > > We have a utility function in NumPy called ctypes_load_library which > handles > finding and loading of shared libraries with ctypes. Currently, shared > library extensions (.dll, .so, .dylib) are hardcoded in this function. > > I propose we modify this function to look something like this: > > def ctypes_load_library(libname, loader_path, distutils_hack=False): > ... > > If distutils_hack is True, instead of the default mechanism (which is > currently hardcoded extensions), ctypes_load_library should do: > > import distutils.config > so_ext = distutils.sysconfig.get_config_var('SO') > > to figure out the extension it should use to load shared libraries. This > should make it reasonably easy for people to build shared libraries with > distutils and use them with NumPy and ctypes. Wouldn't it make more sense to just rename the .pyd generated by distutils to .dll or .so? Especially since the .pyd generated by distutils won't actually be a python extension module. This renaming could be automated by a simple python script that wraps distutils. The addition of the init{modulename} function could also be done by that script. --bb |
From: Bill B. <wb...@gm...> - 2006-08-08 21:25:11
|
Ah, great. That is helpful, though it does seem to be a bit outdated. --bb On 8/8/06, Karol Langner <kar...@kn...> wrote: > > On Tuesday 08 of August 2006 05:18, Bill Baxter wrote: > > I see Pyrex and SWIG examples in numpy/doc but there doesn't seem to be > an > > example of just a simple straightforward usage of the C-API. > > For instance make a few arrays by hand in C and then call numpy.multiply > () > > on them. So far my attempts to call PyArray_SimpleNewFromData all > result > > in segfaults. > > Anyone have such an example? > > > > --Bill > > Have you looked here? > > http://numeric.scipy.org/numpydoc/numpy-13.html#pgfId-36640 > > Karol > > -- > written by Karol Langner > wto sie 8 15:45:16 CEST 2006 > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > |
From: Albert S. <fu...@gm...> - 2006-08-08 21:24:14
|
Hello all With the nice ctypes integration in NumPy, and with Python 2.5 which will include ctypes around the corner, a remote possibility exists that within the next year or two, I might not be the only person that wants to use NumPy with ctypes. This is probably going to mean that this someone is going to want to build a shared library for use with ctypes. This is all well and good if you're using a build tool that knows about shared libraries, but in case this person is stuck with distutils, here is what we might want to do. Following this thread from SciPy-dev: http://projects.scipy.org/pipermail/scipy-dev/2006-April/005708.html I came up with the following plan. As it happens, pretending your shared library is a Python extension mostly works. In your setup.py you can do something like this: config = Configuration(package_name,parent_package,top_path) config.add_extension('libsvm_', define_macros=[('LIBSVM_EXPORTS', None), ('LIBSVM_DLL', None)], sources=[join('libsvm-2.82', 'svm.cpp')], depends=[join('libsvm-2.82', 'svm.h')]) First caveat: on Windows, distutils forces the linker to look for an exported symbol called init<yourextensionname>. In your code you'll have to add an empty function like this: void initlibsvm_() {} This gets us a compiled Python extension, which also happens to be a shared library on every platform I know of, which is Linux and Windows. Counter-examples anyone?. Next caveat: on Windows, shared libraries aka DLLs, typically have a .dll extension. However, Python extensions have a .pyd extension. We have a utility function in NumPy called ctypes_load_library which handles finding and loading of shared libraries with ctypes. Currently, shared library extensions (.dll, .so, .dylib) are hardcoded in this function. I propose we modify this function to look something like this: def ctypes_load_library(libname, loader_path, distutils_hack=False): ... If distutils_hack is True, instead of the default mechanism (which is currently hardcoded extensions), ctypes_load_library should do: import distutils.config so_ext = distutils.sysconfig.get_config_var('SO') to figure out the extension it should use to load shared libraries. This should make it reasonably easy for people to build shared libraries with distutils and use them with NumPy and ctypes. Comments appreciated. Someone checking something along these lines into SVN appreciated more. A solution that doesn't make me want to cry appreciated most. Thanks for reading. Regards, Albert P.S. As it happens, the OOF2 guys have already created a SharedLibrary builder for distutils, but integrating this into numpy.distutils is probably non-trivial. http://www.ctcms.nist.gov/oof/oof2.html |
From: Bill B. <wb...@gm...> - 2006-08-08 21:11:58
|
Matplotlib needs to be recompiled against the latest Numpy. They should release a new version compatible with Numpy 1.0 beta soon. --bb On 8/9/06, George Gumas <gg...@gm...> wrote: > > I downloaded numpy 10000 and matplotlib and when running numpy i get the > error message below > from matplotlib._ns_cntr import * > RuntimeError: module compiled against version 90709 of C-API but this > version of numpy is 1000000 > > How do I go about chaning the version of rither numpy or matplotlib > > Thanks > George > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > > > |
From: Darren D. <dd...@co...> - 2006-08-08 21:11:47
|
On Tuesday 08 August 2006 17:02, George Gumas wrote: > I downloaded numpy 10000 and matplotlib and when running numpy i get the > error message below > from matplotlib._ns_cntr import * > RuntimeError: module compiled against version 90709 of C-API but this > version of numpy is 1000000 > > How do I go about chaning the version of rither numpy or matplotlib This question is more appropriate for the mpl list, and it was discussed there late last week. The next matplotlib release will support numpy beta 1 and 2. Darren |
From: George G. <gg...@gm...> - 2006-08-08 21:02:37
|
I downloaded numpy 10000 and matplotlib and when running numpy i get the error message below from matplotlib._ns_cntr import * RuntimeError: module compiled against version 90709 of C-API but this version of numpy is 1000000 How do I go about chaning the version of rither numpy or matplotlib Thanks George |
From: Karol L. <kar...@kn...> - 2006-08-08 13:46:07
|
On Tuesday 08 of August 2006 05:18, Bill Baxter wrote: > I see Pyrex and SWIG examples in numpy/doc but there doesn't seem to be an > example of just a simple straightforward usage of the C-API. > For instance make a few arrays by hand in C and then call numpy.multiply() > on them. So far my attempts to call PyArray_SimpleNewFromData all result > in segfaults. > Anyone have such an example? > > --Bill Have you looked here? http://numeric.scipy.org/numpydoc/numpy-13.html#pgfId-36640 Karol -- written by Karol Langner wto sie 8 15:45:16 CEST 2006 |
From: <mi...@ya...> - 2006-08-08 10:58:17
|
:―― INFORMATION ―――――――――――――――――――――――――: 不正・悪質なサイトを一切排除しておりますので 安心してご利用ください。 http://love-match.bz/pc/?03 :――――――――――――――――――――――――――――――――――: *・゜゜・*:.。. .。.:*・゜゜・*:.。..。:*・゜゜・*:.。..。:**・゜゜・* お金と時間を持て余している人妻の間で、噂になってるあのサイト [登録・利用料全て無料] http://love-match.bz/pc/?03 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ □■ 不倫・ワリキリ専門の無料出会いサイト『Love☆Match』 ----------------------------------------------------------------- 登録料・利用料 ・・・・・・・・・【無料】 メールの送受信 ・・・・・・・・・【無料】 ユーザーの検索 ・・・・・・・・・【無料】 掲示板の閲覧・書込み ・・・・・・【無料】 画像交換・アップロード ・・・・・【無料】 アドレス交換・電話番号交換 ・・・【無料】 ----------------------------------------------------------------- どれだけ使っても全て無料! http://love-match.bz/pc/?03 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ □■ いつでも女性ユーザーがいっぱい。その理由は? ----------------------------------------------------------------- PC&モバイルに対応!いつでもどこでも気軽に楽しめる! ----------------------------------------------------------------- 仕事中は携帯電話から、プライベートは自宅からのんびりと。 気になる相手といつでも繋がっているから、新密度も急速にUP。 http://love-match.bz/pc/?03 ----------------------------------------------------------------- PCから簡単プロフィール作成。ネット初心者でもラクラク参加OK ----------------------------------------------------------------- 面倒な登録は一切不要。パソコンから簡単なプロフィールを作成して 初心者の方や女性でもすぐに参加できます。 http://love-match.bz/pc/?03 ----------------------------------------------------------------- 自由恋愛対応!直電・直メ交換支援ツール ----------------------------------------------------------------- 基本的にメールアドレスや電話番号は非公開ですが 仲良くなった人だけにメールアドレスや電話番号を教える事ができます。 http://love-match.bz/pc/?03 ----------------------------------------------------------------- 写真アップロードに対応!好みの相手を素早くCHECK! ----------------------------------------------------------------- 待ち合わせ場所にイメージとまったく違う人が来たら…。 ピュアックスなら会う前に写真交換ができるから、そんな不安も解消。 http://love-match.bz/pc/?03 ----------------------------------------------------------------- スレッド掲示板で秘密のパートナー検索も効率UP! ----------------------------------------------------------------- メインの掲示板のほかにスレッド型の掲示板を設置。 メル友から秘密のパートナーまで目的別のユーザーが集う掲示板です。 http://love-match.bz/pc/?03 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ □■ 毎日500人近くのユーザーが続々参加中!! □----------------------------------------------------------------- リエ(21歳/会社員) いつも1人でエッチなことを考えてます。 メールだといろいろ話せるんだけど、実際に会うとあまりしゃべれなく なっちゃうので、盛り上げてくれるような楽しい男の人いないかな? 引っ込み思案のせいか、男性経験はあまり無いんです。 優しく&楽しくリードしてくれる男性からのメール待ってます。 [写真有り] http://love-match.bz/pc/?03 □----------------------------------------------------------------- 真菜(24歳/フリーター) 彼氏が浮気してて超アタマきたっ!まなだって遊びたい盛りだし、ずっと ガマンしてたのにさ!かっこいい人見つけて思いっきりふってやるつもりで 登録してみた(笑) [写真有り] http://love-match.bz/pc/?03 □----------------------------------------------------------------- みさ(34歳/専業主婦) 殆ど家に帰ってこない仕事人間のだんなさまと二人きりの毎日で、ほんと 寂しい思いをしています。年下の男の子がいれば仲良くなりたいな。 年下の人とは付き合ったことがないので興味津々です(^^) [写真無し] http://love-match.bz/pc/?03 □----------------------------------------------------------------- 恭子(28歳/会社員) 彼氏とはいつも同じようなセックスばかりでかなり冷め気味です。 誰かあたしと熱いセックスを楽しみませんか?めんどくさい事は 言いません。ただ、いつもと違うドキドキするような事がしたい だけなんです。 [写真無し] http://love-match.bz/pc/?03 □----------------------------------------------------------------- ななこ(28歳/主婦) 半年前にだんなと別れて今は×1です。 夜のお仕事なので、昼間まったりと過ごしませんか? 心身ともに疲れ気味で、今、激しく癒されたいです。 [写真有り] http://love-match.bz/pc/?03 □----------------------------------------------------------------- 祥子(31歳/クリエイター) 平日は18時くらいまでは大体仕事してるので、その後に食事したり 楽しく飲んだりできるパートナー希望です。年上でも年下でも かまいませんので気軽にメールを送って頂けると嬉しいです。 [写真有り] http://love-match.bz/pc/?03 □----------------------------------------------------------------- ゅヵ`(20歳/学生) まずゎ会ってみないとはじまらなぃょね?! 横浜近辺の人で、いろんな意味でオトナな人は プロフ付きでめぇる送って☆ [写真有り] http://love-match.bz/pc/?03 □----------------------------------------------------------------- 出会いサイトのサクラに騙されないように↓ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ 【裏】無料の出会い情報 ------------------------------------------------------------- お金と時間を持て余している人妻の間で、噂になってるあのサイト [登録・利用料全て無料] http://love-match.bz/pc/?03 ------------------------------------------------------------- 彼女達が求めているのはこんな男性です。 ?年上女性にリードしてもらいたい、経験少なめの男性 ?体力・テクニックに自信が有る男性 男性会員が不足しています。我こそは、と思う方は今すぐ参加! [登録・利用料全て無料] http://love-match.bz/pc/?03 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ 広東省茂名市人民大街3-6-4-533 友誼網絡公司 139-3668-7892 |
From: Hanno K. <kl...@ph...> - 2006-08-08 09:22:52
|
Hello, finally after sorting out some homemade problems I managed to compile numpy-1.0b1. If I then start it from the directory where I compiled it, it works fine. However after I installed numpy with python setup.py install --prefix=/scratch/python2.4 I get the error message: Python 2.4.3 (#7, Aug 2 2006, 18:55:46) [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-52)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in ? File "/scratch/python2.4/lib/python2.4/site-packages/numpy/__init__.py", line 39, in ? import linalg File "/scratch/python2.4/lib/python2.4/site-packages/numpy/linalg/__init__.py", line 4, in ? from linalg import * File "/scratch/python2.4/lib/python2.4/site-packages/numpy/linalg/linalg.py", line 24, in ? from numpy.linalg import lapack_lite ImportError: /scratch/python2.4/lib/python2.4/site-packages/numpy/linalg/lapack_lite.so: undefined symbol: atl_f77wrap_zgemv__ >>> I suppose I have to set a path somewhere to the directory where atlas is installed. How do I do this? Hanno -- Hanno Klemm kl...@ph... |