[Numpy-discussion] License review, cont.

2008-11-11 Thread Jarrod Millman
Now that I have removed all GPL/LGPL code from scipy, I wanted to double check on the licenses of some NumPy code. In particular, 1. FreeBSD license: http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/core/include/numpy/fenv/fenv.c

Re: [Numpy-discussion] License review, cont.

2008-11-11 Thread Robert Kern
On Tue, Nov 11, 2008 at 02:12, Jarrod Millman [EMAIL PROTECTED] wrote: Now that I have removed all GPL/LGPL code from scipy, I wanted to double check on the licenses of some NumPy code. In particular, 1. FreeBSD license:

[Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Rolf Wester
Hi all, I would like to wrap some C++ classes that use TNT-Arrays. Is it possible to pass numpy arrays to C++ functions that expect TNT-Arrays as function parameter? Does anybody know how the wrappers could be generated using swig? I would be very appreciative for any help. With kind regards

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Charles R Harris
On Tue, Nov 11, 2008 at 1:24 AM, Rolf Wester [EMAIL PROTECTED]wrote: Hi all, I would like to wrap some C++ classes that use TNT-Arrays. Is it possible to pass numpy arrays to C++ functions that expect TNT-Arrays as function parameter? Does anybody know how the wrappers could be generated

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Rolf Wester
Charles R Harris wrote: On Tue, Nov 11, 2008 at 1:24 AM, Rolf Wester [EMAIL PROTECTED]wrote: Hi all, I would like to wrap some C++ classes that use TNT-Arrays. Is it possible to pass numpy arrays to C++ functions that expect TNT-Arrays as function parameter? Does anybody know how the

Re: [Numpy-discussion] Numpy.test() hangs

2008-11-11 Thread Charles R Harris
On Tue, Nov 11, 2008 at 10:33 AM, James Philbin [EMAIL PROTECTED] wrote: Python 2.5.2 (r252:60911, Oct 5 2008, 19:29:17) [GCC 4.3.2] on linux2 Type help, copyright, credits or license for more information. import numpy numpy.__version__ '1.3.0.dev6005' numpy.test(verbosity=2) ...

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Charles R Harris
On Tue, Nov 11, 2008 at 2:19 AM, Rolf Wester [EMAIL PROTECTED]wrote: Charles R Harris wrote: On Tue, Nov 11, 2008 at 1:24 AM, Rolf Wester [EMAIL PROTECTED]wrote: Hi all, I would like to wrap some C++ classes that use TNT-Arrays. Is it possible to pass numpy arrays to C++ functions

Re: [Numpy-discussion] Numpy.test() hangs

2008-11-11 Thread Charles R Harris
On Tue, Nov 11, 2008 at 11:00 AM, Charles R Harris [EMAIL PROTECTED] wrote: On Tue, Nov 11, 2008 at 10:33 AM, James Philbin [EMAIL PROTECTED]wrote: Python 2.5.2 (r252:60911, Oct 5 2008, 19:29:17) [GCC 4.3.2] on linux2 Type help, copyright, credits or license for more information.

Re: [Numpy-discussion] Numpy.test() hangs

2008-11-11 Thread Charles R Harris
On Tue, Nov 11, 2008 at 11:13 AM, Charles R Harris [EMAIL PROTECTED] wrote: On Tue, Nov 11, 2008 at 11:00 AM, Charles R Harris [EMAIL PROTECTED] wrote: On Tue, Nov 11, 2008 at 10:33 AM, James Philbin [EMAIL PROTECTED]wrote: Python 2.5.2 (r252:60911, Oct 5 2008, 19:29:17) [GCC 4.3.2]

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Rolf Wester
Charles R Harris wrote: On Tue, Nov 11, 2008 at 2:19 AM, Rolf Wester [EMAIL PROTECTED]wrote: Charles R Harris wrote: On Tue, Nov 11, 2008 at 1:24 AM, Rolf Wester [EMAIL PROTECTED]wrote: Hi all, I would like to wrap some C++ classes that use TNT-Arrays. Is it possible to pass numpy

Re: [Numpy-discussion] Numpy.test() hangs

2008-11-11 Thread James Philbin
Can you try checking the functions log1p and exp separately for all three floating types? Something like Well, log1p seems to be the culprit: import numpy as np np.log1p(np.ones(1,dtype='f')*3) ... hangs here ... exp is fine: import numpy as np np.exp(np.ones(1,dtype='f')*3) array([

Re: [Numpy-discussion] Numpy.test() hangs

2008-11-11 Thread Charles R Harris
On Tue, Nov 11, 2008 at 12:41 PM, James Philbin [EMAIL PROTECTED] wrote: Can you try checking the functions log1p and exp separately for all three floating types? Something like Well, log1p seems to be the culprit: import numpy as np np.log1p(np.ones(1,dtype='f')*3) ... hangs here ...

Re: [Numpy-discussion] Numpy.test() hangs

2008-11-11 Thread James Philbin
My guess is that this is a libm/gcc problem on x86_64, perhaps depending on the flags libm was compiled with. What distro are you using? Ubuntu 8.10 amd64 Can you try plain old log/log10 also? I'll try to put together some c code you can use to check things also so that you can file a bug

Re: [Numpy-discussion] numpy array serialization with JSON

2008-11-11 Thread Simon Palmer
Does JSON have a representation for n-d arrays? In my little work with it, it looked pretty lame for arrays of number, so I'd be surprised. yes it does, thet are just treated as nested lists and the square bracket notation is used. JSON is far from perfect but for objects of basic types it is

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Matthieu Brucher
Hi, Yes, you can, but it can be tricky. What you may need to do is to check if TNT is capable of accepting an array by pointer without handling the memory (delete when the array is destroyed). If there are tools to do this, then it will be easy. If not, you will have to add a specific handler

[Numpy-discussion] Numpy.test() hangs

2008-11-11 Thread James Philbin
Python 2.5.2 (r252:60911, Oct 5 2008, 19:29:17) [GCC 4.3.2] on linux2 Type help, copyright, credits or license for more information. import numpy numpy.__version__ '1.3.0.dev6005' numpy.test(verbosity=2) ... test_umath.TestLogAddExp.test_logaddexp_values ... The test hangs at the last line

Re: [Numpy-discussion] Numpy.test() hangs

2008-11-11 Thread James Philbin
Hmmm... So I examined an objdump of umath.so: objdump -d /usr/lib/python2.5/site-packages/numpy/core/umath.so umath.asm The relevant lines are here: --- 000292c0 log1pf: 292c0: e9 fb ff ff ff jmpq 292c0 log1pf 292c5: 66 66 2e 0f 1f 84 00nopw

Re: [Numpy-discussion] Numpy.test() hangs

2008-11-11 Thread Charles R Harris
On Tue, Nov 11, 2008 at 1:16 PM, James Philbin [EMAIL PROTECTED] wrote: Hmmm... So I examined an objdump of umath.so: objdump -d /usr/lib/python2.5/site-packages/numpy/core/umath.so umath.asm The relevant lines are here: --- 000292c0 log1pf: 292c0: e9 fb ff ff ff

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Hoyt Koepke
Hi Rolf, Just curious -- have you considered using the blitz++ library (http://www.oonumerics.org/blitz/)? There seems to be a lot of overlap in terms of functionality. If you use blitz++, it's largely included in scipy as part of weave. Additionally, I already have code that generates

Re: [Numpy-discussion] Numpy.test() hangs

2008-11-11 Thread Charles R Harris
On Tue, Nov 11, 2008 at 2:25 PM, Charles R Harris [EMAIL PROTECTED] wrote: On Tue, Nov 11, 2008 at 1:16 PM, James Philbin [EMAIL PROTECTED] wrote: Hmmm... So I examined an objdump of umath.so: objdump -d /usr/lib/python2.5/site-packages/numpy/core/umath.so umath.asm The relevant lines

Re: [Numpy-discussion] Numpy.test() hangs

2008-11-11 Thread James Philbin
I think this is now fixed in svn, I'm trying to see if static fixes the problem with the old buggy version. What optimization level is numpy being compiled with? Still a problem here: In [1]: import numpy as np In [2]: np.__version__ Out[2]: '1.3.0.dev6011' In [3]:

Re: [Numpy-discussion] Numpy.test() hangs

2008-11-11 Thread James Philbin
It's working on the buildbots. Did you remove the build directory first? Oops. Great, all working now! James ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] f2py call-back and newbie questions

2008-11-11 Thread Dave Lang
Hello, I apologize for this long listing, but I have a lot of pent-up f2py queries occupying my mind [?] I realize that f2py is a non-commercial service to the community, and am highly impressed that it exists at all. I can only offer in return my own assistance to others (say via this list),

Re: [Numpy-discussion] numpy array serialization with JSON

2008-11-11 Thread Chris.Barker
Simon Palmer wrote: Does JSON have a representation for n-d arrays? In my little work with it, it looked pretty lame for arrays of number, so I'd be surprised. yes it does, thet are just treated as nested lists and the square bracket notation is used. then it looks like one of str(array)