Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-09 Thread David Shepherd
Well, we only need to do an FFT. So I will try all your suggestions tonight and let you know of the results. Thanks for your help! -Dave Travis Oliphant wrote: > David Shepherd wrote: >> My message may have gotten lost over the weekend, but I wanted to see if >> anyone had

[Numpy-discussion] ndarray allocation question

2007-04-09 Thread David Doukhan
example, asking for an array of 2 lines and 7 columns of float32, so that the adress of the biginning of the data would be a multiple of 16 bytes (that's already possible) AND beeing sure that the allocated memory for the data would be at least 16 * sizeof(float32), instead of 14*sizeof(float

Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-09 Thread David Shepherd
The default section of the code compiled just fine and the FFT is working great. Thanks so much for your help! -Dave Travis Oliphant wrote: > David Shepherd wrote: >> My message may have gotten lost over the weekend, but I wanted to see if >> anyone had anything else I can

Re: [Numpy-discussion] ndarray allocation question

2007-04-10 Thread David Doukhan
2007/4/10, Travis Oliphant <[EMAIL PROTECTED]>: > David Doukhan wrote: > > Hi! > > I'm writing you this mail because I would like to do "advanced" use of > > ndarray memory allocation. > > > > So here is a short description of my problem: >

Re: [Numpy-discussion] ndarray allocation question

2007-04-10 Thread David Doukhan
2007/4/10, Travis Oliphant <[EMAIL PROTECTED]>: > David Doukhan wrote: > > >Sorry, i thought doing the following lines: > > > >clib = ctypes.cdll.LoadLibrary("./libtest.so") > >dt = numpy.dtype({'names' : ['x'], 'forma

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-15 Thread David Cournapeau
the correct locations. I have updated the instructions for Ubuntu (also works for debian) on the wiki a few days ago: http://www.scipy.org/Installing_SciPy/Linux#head-c5a062b2ecf76f746d78cfcde1dae00ae26109fe Note that if you have also optimized version installed (sse, sse2

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-15 Thread David Cournapeau
Charles R Harris wrote: > > > On 4/15/07, *David Cournapeau* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Christian K wrote: > > > > Thanks, but that didn't help: > > > > atlas_info: > >

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-17 Thread David Cournapeau
Andrew Straw wrote: > Christian K wrote: > >> David Cournapeau wrote: >> >> >>> On Ubuntu and debian, you do NOT need any site.cfg to compile numpy with >>> atlas support. Just install the package atlas3-base-dev, and you are >>> d

Re: [Numpy-discussion] Question about Optimization (Inline, and Pyrex)

2007-04-17 Thread David Cournapeau
TECTED]/msg02243.html David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread David Cournapeau
y, to build a .so), I can try to dig in my matlab scripts (unused for some time thanks to scipy :) ) cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread David Cournapeau
hared lib) - -C if g77 says to use g77 and not gfortran as the fortran compiler. On debian, g77 is still the default, and gfortran has a different ABI, meaning all kind of problems if you use gfortran for now on debian if you do not know what you are doing. I strongly advise you to use the

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread David Cournapeau
picked up atlas symbols from its existing, already linked own atlas, and not from the atlas installed on my system (which was crashing matlab and was the reason why I went through this pain in the first place). cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] How to call methods from a class with custom matrices parameters with numpy arrays ?

2007-04-19 Thread David Cournapeau
y. The catch is that the layout of the array should be exactly the same than your function expects (most of the time a contiguous array), but there are numpy functions which enforce that. As long as you are not calling thousand of function with small arrays, the wrapp

Re: [Numpy-discussion] How to call methods from a class with custom matrices parameters with numpy arrays ?

2007-04-19 Thread David Cournapeau
calling thousand of function with small arrays, the wrapping is pretty efficient in my experience. cheers, David Thanks for the fast answer ;) I was wondering if ctypes would fit better, but in this case, I have to make the wrapper myself, I suppose ? Here is the basic prototype

Re: [Numpy-discussion] How to call methods from a class with custom matrices parameters with numpy arrays ?

2007-04-19 Thread David Cournapeau
representation of a numpy array to a simple C array and vice et versa), if I remember correctly. There is also boost.python, but I don't know if its situation towards numpy array has changed (eg there was some code lying around to represent numpy arrays in C++). If I were you, and if there are only

Re: [Numpy-discussion] histogram2d bug?

2007-04-19 Thread David Huard
0, 0, ..., 0] smin, smax = x.min(), x.max() How do you select the bin edges ? One solution is to use the same scheme used by histogram: if smin == smax: edges[i] = linspace(smin-.5, smax+.5, nbin[i]+1) Would that be ok ? David I'll submit a patch. 2007/4/19, Emanuele Olivetti <[EMA

Re: [Numpy-discussion] How to call methods from a class with custom matrices parameters with numpy arrays ?

2007-04-19 Thread David Cournapeau
amespace through a fake second argument to the destructor. http://docs.python.org/ref/customization.html (comments on __del__ ). David # Last Change: Fri Apr 20 11:00 AM 2007 J from numpy.ctypeslib import ndpointer, load_library # Load the library _hellocpp = load_library('hellocpp

Re: [Numpy-discussion] matlab vs. python question

2007-04-25 Thread David Cournapeau
no question about that fact. But python makes easy things just a bit more complicated, and all other things possible. The perfect example is namespace: not having namespace IS easier, at first. But this quickly makes things unmanageable. Functions are easier in matlab, but when you wa

Re: [Numpy-discussion] matlab vs. python question

2007-04-26 Thread David Cournapeau
python + numpy for memory consumption; I fail to see any reason why it would be significantly different (except the fact that numpy does not have to use double, whereas matlab had to for a long time, and double is still the default on matlab). David _

Re: [Numpy-discussion] [Python-3000] PEP 31XX: A Type Hierarchy for Numbers (and other algebraic entities)

2007-04-26 Thread David Goldsmith
Guido van Rossum wrote: > Jeffrey, is there any way you can drop the top of the tree and going > straight from Number to Complex -> Real -> Rational -> Integer? These > are the things that everyone with high school math will know. > Having taught mathematics at a community college for a little w

Re: [Numpy-discussion] [Python-3000] PEP 31XX: A Type Hierarchy for Numbers (and other algebraic entities)

2007-04-27 Thread David Goldsmith
Bill Janssen wrote: >> Jeffrey, is there any way you can drop the top of the tree and going >> straight from Number to Complex -> Real -> Rational -> Integer? These >> are the things that everyone with high school math will know. >> > > I think knowledge of the concepts of group, ring, and fie

Re: [Numpy-discussion] [Python-3000] PEP 31XX: A Type Hierarchy for Numbers (and other algebraic entities)

2007-04-27 Thread David Goldsmith
Guido van Rossum wrote: > On 4/27/07, Jan Grant <[EMAIL PROTECTED]> wrote: > >> On Thu, 26 Apr 2007, Dan Christensen wrote: >> >> >>> Note also that double-precision reals are a subset of the rationals, >>> since each double precision real is exactly representable as a >>> rational number,

Re: [Numpy-discussion] [Python-3000] PEP 31XX: A Type Hierarchy for Numbers (and other algebraic entities)

2007-04-27 Thread David Goldsmith
Anton Sherwood wrote: > Jan Grant wrote: > >> . . . the space of doubles include a small number of things >> that aren't representable by a rational (+/- inf, for instance). >> > > +1/0, -1/0 > > Are not unique representations for inf/-inf, (if that matters). DG ___

Re: [Numpy-discussion] [Python-3000] PEP 31XX: A Type Hierarchy for Numbers (and other algebraic entities)

2007-04-27 Thread David Goldsmith
Anton Sherwood wrote: >>> Jan Grant wrote: >>> >>>> . . . the space of doubles include a small number of things >>>> that aren't representable by a rational (+/- inf, for instance). >>>> > > >> Anton Sher

Re: [Numpy-discussion] Building numpy - setting the run path

2007-04-28 Thread David Cournapeau
, I don't see what it is doing ? Does it say where to find library when linking ? When running ? Does it set the patch in the binary ? David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] arctan2 with complex args

2007-04-29 Thread David Goldsmith
I'll take a stab at this one; if I miss the mark, people, please chime in. What's "strange" here is not numpy's behavior but octave's (IMO). Remember that, over R, arctan is used in two different ways: one is simply as a map from (-inf, inf) -> (-pi/2,pi/2) - here, let's call that invtan; the

Re: [Numpy-discussion] arctan2 with complex args

2007-04-29 Thread David Goldsmith
; > "If x or y is complex, then ArcTan[x , y] gives . When , ArcTan[x, y] > gives the number such that and ." > > Lorenzo. > > On 4/29/07, *David Goldsmith* < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > I'll take a stab at

Re: [Numpy-discussion] arctan2 with complex args

2007-04-30 Thread David Goldsmith
terface is real, while the normal > one is purely imaginary: hence the angle of diffraction is still > given by arctan2(k_tangent, k_normal), that, as in Matlab or > Octave, should give pi/2 (that physically means no propagation > -- total internal reflection

Re: [Numpy-discussion] arctan2 with complex args

2007-04-30 Thread David Goldsmith
> (hint what is arctan(0+1j)?) > Well, at the risk of embarrassing myself, using arctan(x+iy) = I get: arctan(0+1i) = -i*log((0+i*1)/sqrt(0^2 + 1^2)) = -i*log(i/1) = -i*log(i) = -i*log(exp(i*pi/2)) = -i*i*pi/2 = pi/2... Is there some reason I'm forgetting (e.g., a branch cut convention or so

Re: [Numpy-discussion] arctan2 with complex args

2007-04-30 Thread David Goldsmith
lorenzo bolla wrote: > hold on, david. the formula I posted previously from wolfram is > ArcTan[x,y] with x or y complex: its the same of arctan2(x,y). arctan > is another function (even though arctan2(y,x) should be "a better" > arctan(y/x)). > > the correct formula

Re: [Numpy-discussion] arctan2 with complex args

2007-04-30 Thread David Goldsmith
Timothy Hochberg wrote: > > > On 4/30/07, *David Goldsmith* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > > (hint what is arctan(0+1j)?) > > > Well, at the risk of embarrassing myself, using arctan(x+iy) = I get: > &g

Re: [Numpy-discussion] Difference in the number of elements in a fromfile() between Windows and Linux

2007-05-04 Thread David Cournapeau
pretty much anywhere, and is designed to be cross platform. David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Should numpy.allclose return True for arrays of different shape ?

2007-05-07 Thread David Cournapeau
Hi, I wanted to know if the following behaviour is a bug or intended behaviour: """ import numpy as N N.allclose(N.array([[1., 1.]]), N.array([1.])) """ eg should allclose return True if arrays have different s

Re: [Numpy-discussion] Should numpy.allclose return True for arrays of different shape ?

2007-05-07 Thread David Cournapeau
Robert Kern wrote: > David Cournapeau wrote: >> Hi, >> >> I wanted to know if the following behaviour is a bug or intended >> behaviour: >> >> """ >> import numpy as N >> N.allclose(N.array([[1., 1.]]), N.array([1.])) &g

Re: [Numpy-discussion] [SciPy-user] median filter with clipping

2007-05-17 Thread David Huard
or it, the TimeSeries package is *extremely* useful to me. David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] [SciPy-user] median filter with clipping

2007-05-17 Thread David Huard
Pierre, 2007/5/17, Pierre GM <[EMAIL PROTECTED]>: But I agree: switching may have some subtle consequences in matplotlib (nothing that can't be quickly fiexed, however). All examples in backend_driver.py test seem to run fine (+ others I added that contained masked arra

Re: [Numpy-discussion] array vs. matrix performance

2007-05-21 Thread David Cournapeau
219585 > My guess would be that for such small matrices, the cost of matrix wrapping is not negligeable against the actual computation. This difference disappears for bigger matrices (for example, try 1000 and 5000 instead of 100 for the first dimension). David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] chirp-z

2007-05-27 Thread David Cournapeau
I > don't see any more. Could you open a ticket on scipy trac with an example which shows the bug, and explain what you want ? I may take a look at it (I have some code to do cross correlation in numpy somewhere, and could take time to improve its quality for inclusion in scipy). Da

Re: [Numpy-discussion] chirp-z

2007-05-27 Thread David Cournapeau
is it enough or not If someone does use fft but does not know it is better to use 2^n, will he take a look at the docstrings :) ? David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] chirp-z

2007-05-28 Thread David Cournapeau
d in numpy trac (provide a hook to an fft implementation at the C level). cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Vista installer?

2007-05-28 Thread David Cournapeau
/IPython/Matplotlib already > installed? > > I posted a question to the VMWare forum about networking, but will > welcome any help from here. > I use vmware to test various packages: it is a barebone version (only command line), dunno i

Re: [Numpy-discussion] Vista installer?

2007-05-28 Thread David Cournapeau
me think that having a ubuntu (or whatever distribution) appliance with scipy and co would be a pretty good thing to have available for promoting scipy... David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/

Re: [Numpy-discussion] ATLAS,LAPACK compilation - help!

2007-05-31 Thread David Cournapeau
rate >make install ! Copy library and include files to other directories > ** > """ > Alternatively, if you are not familiar with compiling softwares (and Atlas can be tricky to compile/install), just install the packages provided by ubuntu: sudo apt-get install atlas3-sse2-dev atlas3-base-dev, and it should be fine. David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] numpy.distutils, system_info and dll/exp/lib

2007-05-31 Thread David Cournapeau
w, users of my package need to generate the .lib by themselves from the dll, using visual studio compiler, which is really too much (specially since the library itself is fine; using the compiler is necessary only for distutils to find the library !). cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] ATLAS,LAPACK compilation - help!

2007-05-31 Thread David Cournapeau
n packages first is the least effort path :) David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] ATLAS,LAPACK compilation - help!

2007-05-31 Thread David Cournapeau
ardware you are probably > better off compiling your own from the latest ATLAS version out > there. > > > Red Hat uses Debian packages ? That sounds odd... FC uses RPM, Debian > uses deb packages. The problem with RPM is, as stated by David some > time ago, that a lot of in

Re: [Numpy-discussion] Numpy-1.0.3 RPM install failure on SUSE 10.2

2007-06-08 Thread David Cournapeau
ckagers). The quickest thing would be to install numpy from sources. If you're willing to help, I have some binary for numpy with my own blas/lapack here, which need some feedback (and updating, too) http://software.opensuse.org/download/home:/ashigabou/openSUSE_10.2/ cheers, David _

Re: [Numpy-discussion] Numpy-1.0.3 RPM install failure on SUSE 10.2

2007-06-09 Thread David Cournapeau
suse.org/science/ > > I tried to install from the RPMs there, but the recursive dependency > chain broke when a gfortran lib that isn't there was required. I also > wonder if there was ANY testing by the packagers. > > http://software.opensuse.org/download/home:/ashigabou > > Times out. :( Unfortunately, there seems to be a lot of server issues on the service... David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Numpy-1.0.3 RPM install failure on SUSE 10.2

2007-06-09 Thread David Cournapeau
testers and timers, dynamically linked to blas and lapack, so that you can use them to test other implementations (say ATLAS). David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] f2py problem under MacOsX: "g95: unrecognized option '-shared'"

2007-06-12 Thread David Tremouilles
or so that should be used (but I'm not skilled enough to trouble shot this myself :-( )... Does somebody know how to solve the problem? David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] f2py problem under MacOsX: "g95: unrecognized option '-shared'"

2007-06-12 Thread David Tremouilles
piler_f90' : ["g95"], 'linker_so': ["g95", '-undefined', 'dynamic_lookup', '-bundle'], # ["g95", "-shared"] #here is the mod 'archiver' : ["ar", "-cr"], 'ranl

Re: [Numpy-discussion] Specifying compiler command line options for numpy.disutils.core

2007-06-14 Thread David Cournapeau
really doubt that ICC runtime is not compatible with gcc, and more globally with the GNU runtime (glibc, etc...); actually, ICC used to use the "standard" linux runtime, and I would be surprised if that changed. To say it simply: on linux at least, what should matter is whether t

Re: [Numpy-discussion] Buildbot for numpy

2007-06-16 Thread David Cournapeau
d can be your own > workstation.) > > We'd like to thank Robert Kern, Jeff Strunk and Gert-Jan van Rooyen > who helped us to get the ball rolling, as well as Neilen Marais for > offering his workstation as a build slave. > This is really great new :) Thanks for the hard work, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Specifying compiler command line options for numpy.disutils.core

2007-06-16 Thread David Cournapeau
l required shared libraries are located (--rpath?), If I understand correctly, that would be --rpath-link. --rpath only helps locating libraries for runtime, whereas --rpath-link helps for locating libraries for linking. values for --rpath-link may use --rpath values, though. David _

[Numpy-discussion] SharedLibrary builder (ticket 213)

2007-06-17 Thread David Cournapeau
cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] question about numpy

2007-06-19 Thread David Cournapeau
Robert Kern wrote: > Stefan van der Walt wrote: >> On Fri, Jun 15, 2007 at 03:44:37PM -0400, David M. Cooke wrote: >>>> I meet a problem when I installed numpy. I installed numpy by the command >>>> "python setup.py install". Then I tested it by "p

[Numpy-discussion] [ANN]New numpy, scipy and atlas rpms for FC 5, 6 and 7 and openSUSE (with 64 bits arch support)

2007-06-24 Thread David Cournapeau
netlib blas and lapack. I would like to hear people complains. If people want other distributions supported by the opensuse build system (such as mandriva), I would like to hear it too. cheers, David ___ Numpy-discussion mailing list Numpy

Re: [Numpy-discussion] [ANN]New numpy, scipy and atlas rpms for FC 5, 6 and 7 and openSUSE (with 64 bits arch support)

2007-06-28 Thread David Cournapeau
Eike Welk wrote: > On Sunday 24 June 2007 13:05, David Cournapeau wrote: >> Hi there, >> >> After quite some pain, I finally managed to build a LAPACK + >> ATLAS rpm useful for numpy and scipy. Read the follow

Re: [Numpy-discussion] Building numpy 1.0.3-2 on Linux 2.6.8 i686 (Debian 3.1)

2007-06-30 Thread David Cournapeau
blas -latlas -llapack -lg2c-pic > -o build/lib.linux-i686-2.5/numpy/linalg/lapack_lite.so" failed with > exit status 1 > """ > > After some Googling, I found a recommendation to unset CFLAGS and > LDFLAGS, but they are not set in the transcript above. > > Any suggestions? Which distribution are you building on ? David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Building numpy 1.0.3-2 on Linux 2.6.8 i686 (Debian 3.1)

2007-07-01 Thread David Cournapeau
Michael Hoffman wrote: > David Cournapeau wrote: >> Michael Hoffman wrote: >>> Hi. I have been trying to build NumPy on a 32-bit Linux box using python >>> setup.py build. I received the following errors: > >> [...] > > >> Which distribution ar

Re: [Numpy-discussion] Scipy release

2007-07-04 Thread David Cournapeau
John Reid wrote: > Ok I'll try that although I guess that it turns off all warnings. that > I'm concerned as well that scipy's release cycle isn't as quick as it > could be. > Well, quite the contrary, it is as quick as it can be. If you think it is too slow,

Re: [Numpy-discussion] Scipy release

2007-07-04 Thread David Cournapeau
void breaking the main trunk (that is using the last subversion is not more buggy than a release). At least, I myself try to do so, and the fact that most scipy dev use subversion help. I always do a full run of the tests when I deploy a new version, though. David ___

[Numpy-discussion] What is an empty matrix ?

2007-07-04 Thread David Cournapeau
Hi, I was wondering what an empty matrix is, and what it is useful for (by empty matrix, I mean something created by numpy.matrix([])) ? Using those crash some functions (see for example scipy ticket #381), and I am not sure how to fix this bug. David

Re: [Numpy-discussion] What is an empty matrix ?

2007-07-04 Thread David Cournapeau
Nils Wagner wrote: > David Cournapeau wrote: >> Hi, >> >> I was wondering what an empty matrix is, and what it is useful for >> (by empty matrix, I mean something created by numpy.matrix([])) ? Using >> those crash some functions (see for example scipy ticket

Re: [Numpy-discussion] What is an empty matrix ?

2007-07-04 Thread David Cournapeau
John Reid wrote: > David Cournapeau wrote: >> Hi, >> >> I was wondering what an empty matrix is, and what it is useful for >> (by empty matrix, I mean something created by numpy.matrix([])) ? Using >> those crash some functions (see for example scipy ticket

[Numpy-discussion] Sum, multiply are slow ?

2007-07-11 Thread David Cournapeau
eit N.sum(a) #-> 26.8 ms %timeit N.dot(a, N.ones(a.shape[1], a.dtype)) #-> 11.3ms %timeit N.dot(N.ones((1, a.shape[0]), a.dtype), a) #-> 15.5ms I realize that dot uses optimized libraries (atlas in my case) and all, but is there any way to improve this situation

Re: [Numpy-discussion] Sum, multiply are slow ?

2007-07-11 Thread David Cournapeau
Travis Oliphant wrote: > David Cournapeau wrote: > >> Hi, >> >> While profiling some code, I noticed that sum in numpy is kind of >> slow once you use axis argument: >> >> > Yes, this is expected because when using an access arg

Re: [Numpy-discussion] Sum, multiply are slow ?

2007-07-12 Thread David Cournapeau
Keith Goodman wrote: > On 7/12/07, David Cournapeau <[EMAIL PROTECTED]> wrote: > >> While profiling some code, I noticed that sum in numpy is kind of >> slow once you use axis argument: >> > > Here is a related thread: > http://projects.scipy.org/p

[Numpy-discussion] What is the different between nanmin and min ?

2007-07-17 Thread David Cournapeau
Hi, I noticed that min and max already ignore Nan, which raises the question: why are there nanmin and nanmax functions ? cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] What is the different between nanmin and min ?

2007-07-17 Thread David Cournapeau
array is not Nan, min ignore nan. import numpy a = 0.1 * numpy.arange(10) numpy.min(a) a[:9] = numpy.nan numpy.min(a) # ignore Nan a = 0.1 * numpy.arange(10) a[-1] = numpy.nan numpy.min(a) # Does not ignore Nan cheers, David ___ Numpy-discussion mailing

Re: [Numpy-discussion] ld.so.1 linker errors building numpy

2007-07-18 Thread David Cournapeau
are willing to follow the above steps, it will be easier to debug things one after the other, I think. cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Wrong lapack version detection (32/64bits)

2007-07-19 Thread David Cournapeau
? If not, and without any modification to the site.cfg of numpy, I don't see why numpy would try to detect the mkl. Maybe some really recent (eg a few days) changes in the trunk ? I build quite regularly the lastest numpy (several times / week) on Ubuntu without problems. > Impor

Re: [Numpy-discussion] Compile extension modules with Visual Studio 2005

2007-07-25 Thread David Cournapeau
enerate the wrappers, a bit like swig does with typemaps for example (maybe f2py can do it for Fortran code ? I have never used f2py, but I think Fortran has a concept of arrays and matrices ?). David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] getting numPy happening for sciPy

2007-07-26 Thread David Cournapeau
Robert Kern wrote: > David Cournapeau wrote: > > >> I am willing to volunteer for the scipy part: I have quite extensive >> experience with building on linux now, and I can now build on windows >> without too much difficulties (I mean hardware-wise). >> &

Re: [Numpy-discussion] getting numPy happening for sciPy

2007-07-26 Thread David Cournapeau
uploaded to the Sourceforge site. The >> Cheeseshop records should be updated to record the new versions. An >> announcement >> should be made to python-announce and the relevant mailing lists. >> >> >> I am willing to volunteer for the scipy part: I have quite extensive experience with building on linux now, and I can now build on windows without too much difficulties (I mean hardware-wise). Concerning the release date: it basically means giving enough time to solve the current bugs, right ? I solved a few bugs from the 0.5.3 milestone, but some of them are outside my knowledge (weave, linalg bugs which depend on fortran code). David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] fourier with single precision

2007-08-01 Thread David Cournapeau
hat you can get some speed by using scipy.fftpack methods instead, if scipy is an option for you. David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] numpy arrays, data allocation and SIMD alignement

2007-08-02 Thread David Cournapeau
orm compatibility should be relatively easy. I don't see any drawback, but I guess other people will. Point 1 is more tricky, as this requires much more changes in the code. Do main developers of numpy have an opinion on this ? cheers, David __

Re: [Numpy-discussion] numpy arrays, data allocation and SIMD alignement

2007-08-03 Thread David Cournapeau
Andrew Straw wrote: > Dear David, > > Both ideas, particularly the 2nd, would be excellent additions to numpy. > I often use the Intel IPP (Integrated Performance Primitives) Library > together with numpy, but I have to do all my memory allocation with the > IPP to ensure fa

Re: [Numpy-discussion] numpy arrays, data allocation and SIMD alignement

2007-08-03 Thread David Cournapeau
_t n); if (PyArray_ISALIGNED_SIMD(a)) { simd_func((double *)a->data, a->size); } else { nosimd_func((double *)a->data, a->size); } - Request explicitely an aligned arrays from any PyArray_* functions which create a ndarray, eg: ar = PyArray_FROM_OF(a, NPY_SIMD

Re: [Numpy-discussion] fourier with single precision

2007-08-06 Thread David Cournapeau
hen, FFT may have specific patterns which mean that only hand tuned routines can get most of the CPU horsepower: both mkl and fftw use SIMD instructions to get their maximum efficiency. David ___ Numpy-discussion mailing list Numpy-discussion@s

Re: [Numpy-discussion] fourier with single precision

2007-08-06 Thread David Cournapeau
t, which may be faster (never used it). - if you care also about memory, then maybe you will have no choice but using your own routines for float support. FFTW support both single and double precision, but only double is available in scipy. cheers, David > Thanks > > L

Re: [Numpy-discussion] numpy arrays, data allocation and SIMD alignement

2007-08-06 Thread David Cournapeau
Lisandro Dalcin wrote: > On 8/3/07, David Cournapeau <[EMAIL PROTECTED]> wrote: >> Here is what I can think of: >> - adding an API to know whether a given PyArrayObject has its data >> buffer 16 bytes aligned, and requesting a 16 bytes aligned >> PyArrayO

Re: [Numpy-discussion] numpy arrays, data allocation and SIMD alignement

2007-08-06 Thread David Cournapeau
Anne Archibald wrote: > > I have to agree. I can hardly volunteer David for anything, and I > don't have time to implement this myself, but I think a custom > allocator is a rather special-purpose tool; if one were to implement > one, I think the way to go would be to imp

Re: [Numpy-discussion] numpy arrays, data allocation and SIMD alignement

2007-08-06 Thread David Cournapeau
anymore anyway. I will try to prepare a patch the next few days, then. cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy arrays, data allocation and SIMD alignement

2007-08-08 Thread David Cournapeau
tand the discussion on doing it in python: first, this means you cannot request a data buffer at the C level, and I don't understand the whole discussion on slice, multi dimension and so on either: at the C level, different libraries may need different arrays formats, and in the

Re: [Numpy-discussion] numpy arrays, data allocation and SIMD alignement

2007-08-09 Thread David Cournapeau
en a simple change of the definition of PyDataMem_New to an aligned malloc with a constant. I have already the code for this, and besides aligned malloc code, it is like a 5 lines change of numpy code, nothing terrible, really. David ___ Numpy-dis

Re: [Numpy-discussion] numpy arrays, data allocation and SIMD alignement

2007-08-09 Thread David Cournapeau
Charles R Harris wrote: > > Ah, you want it in C. What would be the use to get SIMD aligned arrays in python ? David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Where to put misc C function in numpy ?

2007-08-09 Thread David Cournapeau
numpy code structure, there is no such facility available (eg a pure C library, totally unaware of python, which would contain some useful tools for numpy), right ? David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.o

Re: [Numpy-discussion] numpy arrays, data allocation and SIMD alignement

2007-08-09 Thread David Cournapeau
On 8/9/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > On 8/9/07, David Cournapeau <[EMAIL PROTECTED]> wrote: > > Charles R Harris wrote: > > > > > > Ah, you want it in C. > > What would be the use to get SIMD aligned arrays in python ? >

Re: [Numpy-discussion] numpy arrays, data allocation and SIMD alignement

2007-08-09 Thread David Cournapeau
The C code can be tested really easily (since it is independent of python). David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] I am volunteering to be the release manager for NumPy 1.0.3.1 and SciPy 0.5.2

2007-08-09 Thread David Cournapeau
is ATLAS, right ? I have discussed a bit the issue with Clint Whaley (the main developer of ATLAS), and I think I got a way to build ATLAS without using SSE (which caused trouble for some "old" ATHLON last time, AFAIK). I can provide the information

[Numpy-discussion] SIMD friendly allocators: first patch

2007-08-11 Thread David Cournapeau
solve (will test it soon on windows and mac os X). It does not provide yet high level interface (eg requestion python arrays with given alignment), but if people agree with the current design, those should not be too difficult to implement. cheers, David

[Numpy-discussion] [f2py] Adding custom code in module initialization code

2007-08-12 Thread David Cournapeau
Hi, I would like to know if it is possible to tell f2py to call some functions inside the initialization function of a module ? I found a mention to add some function to the module function list, but nothing about the initialization function. cheers, David

Re: [Numpy-discussion] [f2py] Adding custom code in module initialization code

2007-08-13 Thread David Cournapeau
Pearu Peterson wrote: > On Mon, August 13, 2007 8:43 am, David Cournapeau wrote: > >> Hi, >> >> I would like to know if it is possible to tell f2py to call some >> functions inside the initialization function of a module ? I found a >> mention to add

Re: [Numpy-discussion] [f2py] Adding custom code in module initialization code

2007-08-13 Thread David Cournapeau
David Cournapeau wrote: > Pearu Peterson wrote: > >> On Mon, August 13, 2007 8:43 am, David Cournapeau wrote: >> >> >>> Hi, >>> >>> I would like to know if it is possible to tell f2py to call some >>> functions inside the

Re: [Numpy-discussion] Vectorize leaks

2007-08-13 Thread David Huard
Hi Chris, Same problem for ubuntu linux. Darn, I spent an hour tracking this bug and now I see you found it before... 2007/8/13, Chris Fonnesbeck <[EMAIL PROTECTED]>: > > I have narrowed a memory leak in PyMC down to the vectorize() function > in numpy. I have a simple inverse logit transformati

Re: [Numpy-discussion] fast putmask implementation

2007-08-16 Thread David Cournapeau
han it needs to be. So I followed David Cournapeau's example > of fastclip and made a similar fastputmask. The diff relative to > current svn (3967) is attached. Great ! putmask was actually the function I wanted to improve after clip, because it is the second bottleneck for matplot

Re: [Numpy-discussion] comparing arrays with NaN in them.

2007-08-24 Thread David Cournapeau
s NAN iff x != x. A Nan is defined at the binary level as having the exponent to 1 everywhere, and any non zero value in the mantissa: http://en.wikipedia.org/wiki/NaN Personaly, I would simply compare the non Nan numbers if Nan is a possible outcome of the operation. Checking at the binary level may make sen

Re: [Numpy-discussion] comparing arrays with NaN in them.

2007-08-24 Thread David Goldsmith
What is meant by "multiple nan-s"? DG mark wrote: > There may be multiple nan-s, but what Chris did is simply create one > with the same nan's > > a = N.array((1,2,3,N.nan)) b = N.array((1,2,3,N.nan)) > > I think these should be the same. > Can anybody give me a good re

Re: [Numpy-discussion] comparing arrays with NaN in them.

2007-08-24 Thread David Goldsmith
Never mind. (Posted that before finishing the thread, sorry). DG David Goldsmith wrote: > What is meant by "multiple nan-s"? > > DG > > mark wrote: > >> There may be multiple nan-s, but what Chris did is simply create one >> with the same nan's &g

<    1   2   3   4   5   6   7   8   9   10   >