Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-30 Thread Matthieu Brucher
After, I agree with you. 2015-09-30 18:14 GMT+01:00 Robert Kern <robert.k...@gmail.com>: > On Wed, Sep 30, 2015 at 10:35 AM, Matthieu Brucher > <matthieu.bruc...@gmail.com> wrote: >> >> Yes, obviously, the code has NR parts, so it can't be licensed as BSD >> as

Re: [Numpy-discussion] Cython-based OpenMP-accelerated quartic polynomial solver

2015-09-30 Thread Matthieu Brucher
Yes, obviously, the code has NR parts, so it can't be licensed as BSD as it is... Matthieu 2015-09-30 2:37 GMT+01:00 Charles R Harris : > > > On Tue, Sep 29, 2015 at 6:48 PM, Chris Barker - NOAA Federal > wrote: >> >> This sounds pretty cool --

Re: [Numpy-discussion] Mathematical functions in Numpy

2015-03-17 Thread Matthieu Brucher
Hi, These functions are defined in the C standard library! Cheers, Matthieu 2015-03-17 18:00 GMT+00:00 Shubhankar Mohapatra mshubhan...@yahoo.co.in: Hello all, I am a undergraduate and i am trying to do a project this time on numppy in gsoc. This project is about integrating vector math

Re: [Numpy-discussion] The BLAS problem (was: Re: Wiki page for building numerical stuff on Windows)

2014-05-12 Thread Matthieu Brucher
Yes, they seem to be focused on HPC clusters with sometimes old rules (as no shared library). Also, they don't use a potable Makefile generator, not even autoconf, this may also play a role in Windows support. 2014-05-12 12:52 GMT+01:00 Olivier Grisel olivier.gri...@ensta.org: BLIS looks

Re: [Numpy-discussion] The BLAS problem (was: Re: Wiki page for building numerical stuff on Windows)

2014-05-12 Thread Matthieu Brucher
-12 14:23 GMT+02:00 Matthieu Brucher matthieu.bruc...@gmail.com: Yes, they seem to be focused on HPC clusters with sometimes old rules (as no shared library). Also, they don't use a potable Makefile generator, not even autoconf, this may also play a role in Windows support. 2014-05-12 12:52

Re: [Numpy-discussion] [Hdf-forum] ANN: HDF5 for Python 2.3.0

2014-04-22 Thread Matthieu Brucher
Good work! Small question : do you now have the interface to set alignment? Cheers, Matthieu 2014-04-22 14:25 GMT+01:00 Andrew Collette andrew.colle...@gmail.com: Announcing HDF5 for Python (h5py) 2.3.0 === The h5py team is happy to announce the

Re: [Numpy-discussion] [Hdf-forum] ANN: HDF5 for Python 2.3.0

2014-04-22 Thread Matthieu Brucher
OK, I may end up doing it, as it can be quite interesting! Cheers, Matthieu 2014-04-22 15:45 GMT+01:00 Andrew Collette andrew.colle...@gmail.com: Hi, Good work! Small question : do you now have the interface to set alignment? Unfortunately this didn't make it in to 2.3. Pull requests are

Re: [Numpy-discussion] Suggestion: Port Theano RNG implementation to NumPy

2014-02-18 Thread Matthieu Brucher
) and he recommanded this one for our problem. For the GPU, we don't want an rng that have too much register too. Robert K. commented that this would need refactoring of numpy.random and then it would be easy to have many rng. Fred On Tue, Feb 18, 2014 at 10:56 AM, Matthieu Brucher

Re: [Numpy-discussion] deprecate numpy.matrix

2014-02-10 Thread Matthieu Brucher
Yes, but these will be scipy.sparse matrices, nothing to do with numpy (dense) matrices. Cheers, Matthieu 2014-02-10 Dinesh Vadhia dineshbvad...@hotmail.com: Scipy sparse uses matrices - I was under the impression that scipy sparse only works with matrices or have things moved on?

Re: [Numpy-discussion] MKL and OpenBLAS

2014-02-06 Thread Matthieu Brucher
According to the discussions on the ML, they switched from GPL to MPL to enable the kind of distribution numpy/scipy is looking for. They had some hesitations between BSD and MPL, but IIRC their official stand is to allow inclusion inside BSD-licensed code. Cheers, Matthieu 2014-02-06 20:09

Re: [Numpy-discussion] runtime warning for where

2013-11-16 Thread Matthieu Brucher
Hi, Don't forget that np.where is not smart. First np.sin(x)/x is computed for the array, which is why you see the warning, and then np.where selects the proper final results. Cheers, Matthieu 2013/11/16 David Pine djp...@gmail.com: The program at the bottom of this message returns the

Re: [Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread Matthieu Brucher
Hi, It's to be expected. You are overwritten one of your input vector while it is still being used. So not a numpy bug ;) Matthieu 2013/5/23 Pierre Haessig pierre.haes...@crans.org Hi Nicolas, Le 23/05/2013 15:45, Nicolas Rougier a écrit : if I use either a or b as output, results are

Re: [Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread Matthieu Brucher
In my point of view, you should never use an output argument equal to an input argument. It can impede a lot of optimizations. Matthieu 2013/5/23 Nicolas Rougier nicolas.roug...@inria.fr Sure, that's clearly what's going on, but numpy shouldn't let you silently shoot yourself in the

Re: [Numpy-discussion] what do I get if I build with MKL?

2013-04-19 Thread Matthieu Brucher
Hi, I think you have at least linear algebra (lapack) and dot. Basic arithmetics will not benefit, for expm, logm... I don't know. Matthieu 2013/4/19 Neal Becker ndbeck...@gmail.com What sorts of functions take advantage of MKL? Linear Algebra (equation solving)? Something like dot

Re: [Numpy-discussion] what do I get if I build with MKL?

2013-04-19 Thread Matthieu Brucher
For the matrix multiplication or array dot, you use BLAS3 functions as they are more or less the same. For the rest, nothing inside Numpy uses BLAS or LAPACK explicitelly IIRC. You have to do the calls yourself. 2013/4/19 Neal Becker ndbeck...@gmail.com KACVINSKY Tom wrote: You also get

Re: [Numpy-discussion] what do I get if I build with MKL?

2013-04-19 Thread Matthieu Brucher
(directly, or via a numpy/scipy interface). Tom *From:* numpy-discussion-boun...@scipy.org [mailto: numpy-discussion-boun...@scipy.org] *On Behalf Of *Matthieu Brucher *Sent:* Friday, April 19, 2013 9:50 AM *To:* Discussion of Numerical Python *Subject:* Re: [Numpy-discussion] what do I get

Re: [Numpy-discussion] OpenOpt Suite release 0.45

2013-03-16 Thread Matthieu Brucher
Hi, Different objects can have the same hash, so it compares to find the actual correct object. Usually when you store something in a dict and later you can't find it anymore, it is that the internal state changed and that the hash is not the same anymore. Matthieu 2013/3/16 Dmitrey

Re: [Numpy-discussion] OpenOpt Suite release 0.45

2013-03-16 Thread Matthieu Brucher
сообщение --- От кого: Matthieu Brucher matthieu.bruc...@gmail.com Дата: 16 марта 2013, 11:33:39 Hi, Different objects can have the same hash, so it compares to find the actual correct object. Usually when you store something in a dict and later you can't find it anymore

Re: [Numpy-discussion] Casting Bug or a Feature?

2013-01-16 Thread Matthieu Brucher
Hi, Actually, this behavior is already present in other languages, so I'm -1 on additional verbosity. Of course a += b is not the same as a = a + b. The first one modifies the object a, the second one creates a new object and puts it inside a. The behavior IS consistent. Cheers, Matthieu

Re: [Numpy-discussion] www.numpy.org home page

2012-12-16 Thread Matthieu Brucher
Does anyone have an informed opinion on the quality of these books: NumPy 1.5 Beginner's Guide, Ivan Idris, http://www.packtpub.com/numpy-1-5-using-real-world-examples-beginners-guide/book NumPy Cookbook, Ivan Idris, http://www.packtpub.com/numpy-for-python-cookbook/book Packt is looking

Re: [Numpy-discussion] Scipy dot

2012-11-09 Thread Matthieu Brucher
Oh, about the differences. If there is something like cache blocking inside ATLAS (which would make sense), the MAD are not in exactly the same order and this would lead to some differences. You need to compare the MSE/sum of values squared to the machine precision. Cheers, 2012/11/9 Matthieu

Re: [Numpy-discussion] Problems when using ACML with numpy

2012-05-12 Thread Matthieu Brucher
Does ACML now provide a CBLAS interface? Matthieu 2012/5/12 Thomas Unterthiner thomas_unterthi...@web.de On 05/12/2012 03:27 PM, numpy-discussion-requ...@scipy.org wrote: 12.05.2012 00:54, Thomas Unterthiner kirjoitti: [clip] The process will have 100% CPU usage and will not show any

Re: [Numpy-discussion] C++ Example

2012-03-06 Thread Matthieu Brucher
Using either for numerical programming usually a mistake. This is your opinion, but there are a lot of numerical code now in C++ and they are far more maintainable than in Fortran. And they are faster for exactly this reason. Matthieu -- Information System Engineer, Ph.D. Blog:

Re: [Numpy-discussion] C++ Example

2012-03-06 Thread Matthieu Brucher
2012/3/6 Sturla Molden stu...@molden.no On 06.03.2012 21:45, Matthieu Brucher wrote: This is your opinion, but there are a lot of numerical code now in C++ and they are far more maintainable than in Fortran. And they are faster for exactly this reason. That is mostly because C++ makes

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-20 Thread Matthieu Brucher
C++11 has this option: for (auto item : container) { // iterate over the container object, // get a reference to each item // // container can be an STL class or // A C-style array with known size. } Which does this: for item in container: pass It is even

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-20 Thread Matthieu Brucher
Would it be fair to say then, that you are expecting the discussion about C++ will mainly arise after the Mark has written the code? I can see that it will be easier to specific at that point, but there must be a serious risk that it will be too late to seriously consider an alternative

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-20 Thread Matthieu Brucher
2012/2/19 Matthew Brett matthew.br...@gmail.com Hi, On Sat, Feb 18, 2012 at 8:38 PM, Travis Oliphant tra...@continuum.io wrote: We will need to see examples of what Mark is talking about and clarify some of the compiler issues. Certainly there is some risk that once code is written

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-20 Thread Matthieu Brucher
2012/2/19 Nathaniel Smith n...@pobox.com On Sun, Feb 19, 2012 at 9:16 AM, David Cournapeau courn...@gmail.com wrote: On Sun, Feb 19, 2012 at 8:08 AM, Mark Wiebe mwwi...@gmail.com wrote: Is there a specific target platform/compiler combination you're thinking of where we can do tests on

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-20 Thread Matthieu Brucher
2012/2/19 Sturla Molden stu...@molden.no Den 19.02.2012 10:28, skrev Mark Wiebe: Particular styles of using templates can cause this, yes. To properly do this kind of advanced C++ library work, it's important to think about the big-O notation behavior of your template instantiations, not

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-20 Thread Matthieu Brucher
2012/2/20 Daniele Nicolodi dani...@grinta.net On 18/02/12 04:54, Sturla Molden wrote: This is not true. C++ can be much easier, particularly for those who already know Python. The problem: C++ textbooks teach C++ as a subset of C. Writing C in C++ just adds the complexity of C++ on top of

Re: [Numpy-discussion] strange conversion integer to float

2011-12-17 Thread Matthieu Brucher
Hi, If I remember correctly, float is a double (precision float). The precision is more important in doubles (float64) than in usual floats (float32). And 20091231 can not be reprensented in 32bits floats. Matthieu 2011/12/17 Alex van Houten sparrow2...@yahoo.com Try this: $ python Python

Re: [Numpy-discussion] Is distributing GPL + exception dll in the windows installer ok

2011-10-30 Thread Matthieu Brucher
Hi David, Is every GPL part GCC related? If yes, GCC has a licence that allows to redistribute its runtime in any program (meaning the program's licence is not relevant). Cheers, Matthieu 2011/10/30 David Cournapeau courn...@gmail.com Hi, While testing the mingw gcc 3.x - 4.x migration, I

Re: [Numpy-discussion] Numpy - MKL - build error

2011-09-14 Thread Matthieu Brucher
It seems you are missing libiomp5.so, which is sound if you re using the whole Composer package: the needed libs are split in two different locations, and unfortunately, Numpy cannot cope with this last time I checked (I think it was one of the reasons David Cournapeau created numscons and bento).

Re: [Numpy-discussion] Strange behavior of operator *=

2011-04-05 Thread Matthieu Brucher
Indeed, it is not. In the first case, you keep your original object and each (integer) element is multiplied by 1.0. In the second example, you are creating a temporary object a*x, and as x is a float and a an array of integers, the result will be an array of floats, which will be assigned to a.

Re: [Numpy-discussion] bug with numpy 2 ** N

2011-03-23 Thread Matthieu Brucher
Hi, I don't thnk this is a bug. You are playign with C integers, not Python integers, and the former are limited. It's a common feature in all processors (even DSPs). Matthieu 2011/3/23 Dmitrey tm...@ukr.net 2**64 18446744073709551616L 2**array(64) -9223372036854775808 2**100

Re: [Numpy-discussion] Nonzero behaving strangely?

2011-03-17 Thread Matthieu Brucher
Hi, Did you try np.where(res[:,4]==2) ? Matthieu 2011/3/17 santhu kumar mesan...@gmail.com Hello all, I am new to Numpy. I used to program before in matlab and am getting used to Numpy. I have a array like: res array([[ 33.35053669, 49.4615004 , 44.27631299, 1., 2. ],

Re: [Numpy-discussion] Fortran was dead ... [was Re: rewriting NumPy code in C or C++ or similar]

2011-03-15 Thread Matthieu Brucher
C++ templates maks binaries almost impossible to debug. Never had an issue with this and all my number crunching code is done through metaprogramming (with vectorization, cache blocking...) So I have a lot of complex template structures, and debugging them is easy. Then, if someone doesn't

Re: [Numpy-discussion] Fortran was dead ... [was Re: rewriting NumPy code in C or C++ or similar]

2011-03-14 Thread Matthieu Brucher
Hi, Intel Fortran is an excellent Fortran compiler. Why is Fortran still better than C and C++? - some rules are different, like arrays passed to functions are ALWAYS supposed to be independent in Fortran, whereas in C, you have to add a restrict keyword - due to the last fact, Fortran is a

[Numpy-discussion] Small typo in fromregex

2011-02-28 Thread Matthieu Brucher
Hi, I'm sorry I didn't file a bug, I have some troubles getting my old trac account back :| In lib/npyio.py, there is a mistake line 1029. Instead on fh.close(), it should have been file.close(). If fromregex opens the file, it will crash because the name of the file is not correct. Matthieu --

Re: [Numpy-discussion] OT: performance in C extension; OpenMP, or SSE ?

2011-02-17 Thread Matthieu Brucher
Do you think, one could get even better ? And, where does the 7% slow-down (for single thread) come from ? Is it possible to have the OpenMP option in a code, without _any_ penalty for 1 core machines ? There will always be a penalty for parallel code that runs on one core. You have at least

Re: [Numpy-discussion] OT: performance in C extension; OpenMP, or SSE ?

2011-02-17 Thread Matthieu Brucher
Then, where does the overhead come from ? -- The call toomp_set_dynamic(dynamic); Or the #pragma omp parallel for private(j, i,ax,ay, dif_x, dif_y) It may be this. You initialize a thread pool, even if it has only one thread, and there is the dynamic part, so OpenMP may create several

Re: [Numpy-discussion] OT: performance in C extension; OpenMP, or SSE ?

2011-02-17 Thread Matthieu Brucher
, having (only) 4 cores) Cheers, Sebastian. On Thu, Feb 17, 2011 at 10:57 AM, Matthieu Brucher matthieu.bruc...@gmail.com wrote: Then, where does the overhead come from ? -- The call toomp_set_dynamic(dynamic); Or the #pragma omp parallel for private(j, i,ax,ay, dif_x, dif_y

Re: [Numpy-discussion] OT: performance in C extension; OpenMP, or SSE ?

2011-02-15 Thread Matthieu Brucher
Hi, My first move would be to add a restrict keyword to dist (i.e. dist is the only pointer to the specific memory location), and then declare dist_ inside the first loop also with a restrict. Then, I would run valgrind or a PAPI profil on your code to see what causes the issue (false sharing,

Re: [Numpy-discussion] OT: performance in C extension; OpenMP, or SSE ?

2011-02-15 Thread Matthieu Brucher
valgrind with C extensions? I don't know what PAPI profil is ...? -Sebastian On Tue, Feb 15, 2011 at 4:54 PM, Matthieu Brucher matthieu.bruc...@gmail.com wrote: Hi, My first move would be to add a restrict keyword to dist (i.e. dist is the only pointer to the specific memory location

Re: [Numpy-discussion] mkl 10.3 linking - undefined symbol: i_free?

2011-02-13 Thread Matthieu Brucher
Hi, This pops up regularly here, you can search with Google and find this page: http://matt.eifelle.com/2008/11/03/i-used-the-latest-mkl-with-numpy-and/ Matthieu 2011/2/13 Andrzej Giniewicz ggi...@gmail.com Hello, I'd like to ask if anyone got around the undefined symbol i_free issue? What

Re: [Numpy-discussion] Is numpy/scipy linux apt or PYPI installation linked with ACML?

2011-01-23 Thread Matthieu Brucher
I think the main issue is that ACML didn't have an official CBLAS interface, so you have to check if they provide one now. If thy do, it should be almost easy to link against it. Matthieu 2011/1/23 David Cournapeau courn...@gmail.com 2011/1/23 Dmitrey tm...@ukr.net: Hi all, I have AMD

Re: [Numpy-discussion] Why arange has no stop-point opt-in?

2010-12-30 Thread Matthieu Brucher
2010/12/30 K.-Michael Aye kmichael@gmail.com: On 2010-12-30 16:43:12 +0200, josef.p...@gmail.com said: Since linspace exists, I don't see much point in adding the stop point in arange. I use arange mainly for integers as numpy equivalent of python's range. And I often need arange(n+1)

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Matthieu Brucher
2010/11/23 Zachary Pincus zachary.pin...@yale.edu: On Nov 23, 2010, at 10:57 AM, Gael Varoquaux wrote: On Tue, Nov 23, 2010 at 04:33:00PM +0100, Sebastian Walter wrote: At first glance it looks as if a relaxation is simply not possible: either there are additional rows or not. But with some

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-23 Thread Matthieu Brucher
2010/11/24 Gael Varoquaux gael.varoqu...@normalesup.org: On Tue, Nov 23, 2010 at 07:14:56PM +0100, Matthieu Brucher wrote: Jumping in a little late, but it seems that simulated annealing might be a decent method here: take random steps (drawing from a distribution of integer step sizes

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-22 Thread Matthieu Brucher
2010/11/22 Gael Varoquaux gael.varoqu...@normalesup.org: Hi list, Hi ;) does anybody have, or knows where I can find some N dimensional dichotomy optimization code in Python (BSD licensed, or equivalent)? I don't know any code, but it should be too difficult by bgoing through a KdTree.

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-22 Thread Matthieu Brucher
2010/11/22 Gael Varoquaux gael.varoqu...@normalesup.org: On Mon, Nov 22, 2010 at 09:12:45PM +0100, Matthieu Brucher wrote: Hi ;) Hi bro does anybody have, or knows where I can find some N dimensional dichotomy optimization code in Python (BSD licensed, or equivalent)? I don't know any

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-22 Thread Matthieu Brucher
2010/11/22 Gael Varoquaux gael.varoqu...@normalesup.org: On Mon, Nov 22, 2010 at 11:12:26PM +0100, Matthieu Brucher wrote: It seems that a simplex is what you need. Ha! I am learning new fancy words. Now I can start looking clever. I realize that maybe I should rephrase my question to try

Re: [Numpy-discussion] N dimensional dichotomy optimization

2010-11-22 Thread Matthieu Brucher
2010/11/22 Gael Varoquaux gael.varoqu...@normalesup.org: On Mon, Nov 22, 2010 at 11:12:26PM +0100, Matthieu Brucher wrote: It seems that a simplex is what you need. It uses the barycenter (more or less) to find a new point in the simplex. And it works well only in convex functions (but in fact

Re: [Numpy-discussion] Precision difference between dot and sum

2010-11-02 Thread Matthieu Brucher
It would be great if someone could let me know why this happens. They don't use the same implementation, so such tiny differences are expected - having exactly the same solution would have been surprising, actually. You may be surprised about the difference for such a trivial operation, but

Re: [Numpy-discussion] dot() performance depends on data?

2010-09-11 Thread Matthieu Brucher
Denormal numbers are a tricky beast. You may have to change the clip or the shift depending on the processor you have. It's no wonder that processors and thus compilers have options to round denormals to zero. Matthieu 2010/9/11 Hagen Fürstenau ha...@zhuliguan.net: Anyway, seems it is indeed a

[Numpy-discussion] Equivalent Matlab function

2010-09-02 Thread Matthieu Brucher
Hi, I'm looking for a Numpy equivalent of convmtx (http://www.mathworks.in/access/helpdesk/help/toolbox/signal/convmtx.html). Is there something inside Numpy directly? or perhaps Scipy? Matthieu -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn:

Re: [Numpy-discussion] Equivalent Matlab function

2010-09-02 Thread Matthieu Brucher
Thanks Joseph, I'll wrap this inside my code ;) Matthieu 2010/9/2 josef.p...@gmail.com: On Thu, Sep 2, 2010 at 3:56 AM, Matthieu Brucher matthieu.bruc...@gmail.com wrote: Hi, I'm looking for a Numpy equivalent of convmtx (http://www.mathworks.in/access/helpdesk/help/toolbox/signal

Re: [Numpy-discussion] longdouble (float96) literals

2010-08-18 Thread Matthieu Brucher
I don't think there is longdouble on Windows, is there? Matthieu 2010/8/18 josef.p...@gmail.com: On Wed, Aug 18, 2010 at 10:36 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, Aug 18, 2010 at 8:25 AM, Colin Macdonald macdon...@maths.ox.ac.uk wrote: On 08/18/10 15:14,

Re: [Numpy-discussion] Installing numpy with MKL

2010-08-05 Thread Matthieu Brucher
I've been having a similar problem compiling NumPy with MKL on a cluster with a site-wide license. Dag's site.cfg fails to config if I use 'iomp5' in it, since (at least with this version, 11.1) libiomp5 is located in        /scinet/gpc/intel/Compiler/11.1/072/lib/intel64/ whereas the

Re: [Numpy-discussion] Installing numpy with MKL

2010-08-04 Thread Matthieu Brucher
2010/8/4 Søren Gammelmark gammelm...@phys.au.dk: I wouldn't know for sure, but could this be related to changes to the gcc compiler in Fedora 13 (with respect to implicit DSO linking) or would that only be an issue at build-time?

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Matthieu Brucher
Which version of Python are you actually using in this example? Matthieu 2010/7/27 Robert Faryabi robert.fary...@gmail.com: I am new to numpy. Hopefully this is a correct forum to post my question. I have Ubuntu Luci system. I installed Python 2.6.5 and Python 3.0 as well as python-numpy

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Matthieu Brucher
Python 2.6.5 from Ubuntu? I tried the same yesterday evening, and it worked like a charm. Matthieu 2010/7/27 Robert Faryabi robert.fary...@gmail.com: I am using 2.5.6 Python 2.6.5 (r265:79063, Jun 28 2010, 20:31:28) [GCC 4.4.3] on linux2 On Tue, Jul 27, 2010 at 9:51 AM, Matthieu Brucher

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Matthieu Brucher
It's a problem of compilation of Python and numpy with different parameters. But I've tried the same yesterday, and the Ubuntu repository are OK in that respect, so there is something not quite right with your configuration. Matthieu 2010/7/27 Robert Faryabi robert.fary...@gmail.com: I can see

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Matthieu Brucher
 1114111, i.e 65535 , so I have 4 byte (on Debian) ) So, most likely you have some hand compiled Python somewhere - Sebastian Haase On Tue, Jul 27, 2010 at 4:33 PM, Matthieu Brucher matthieu.bruc...@gmail.com wrote: It's a problem of compilation of Python and numpy with different

Re: [Numpy-discussion] numpy for Python 3?

2010-07-19 Thread Matthieu Brucher
Dave, I got: c:\SVNRepository\numpyC:\Python31python setup.py bdist_wininst 'C:\Python31' is not recognized as an internal or external command, operable program or batch file. Or didn't I do exactly what you suggested? python setup.py bdist_wininst Assuming you have a C compiler on your

Re: [Numpy-discussion] Release candidate 3 for NumPy 1.4.1 and SciPy 0.7.2

2010-04-19 Thread Matthieu Brucher
Hi, I'm trying to compile scipy with ICC (numpy got through correctly), but I have issue with infinites in cephes: icc: scipy/special/cephes/const.c scipy/special/cephes/const.c(94): error: floating-point operation result is out of range double INFINITY = 1.0/0.0; /* 99e999; */

Re: [Numpy-discussion] Release candidate 3 for NumPy 1.4.1 and SciPy 0.7.2

2010-04-19 Thread Matthieu Brucher
BTW, there still is an error with ifort, so scipy is still incompatible with the Intel compilers (which is at least very sad...) Matthieu 2010/4/19 Matthieu Brucher matthieu.bruc...@gmail.com: Hi, I'm trying to compile scipy with ICC (numpy got through correctly), but I have issue

Re: [Numpy-discussion] size of a specific dimension of a numpy array

2010-03-17 Thread Matthieu Brucher
Hi, A.shape[1] 2010/3/17 gerardo.berbeglia gberbeg...@gmail.com: I would like to know a simple way to know the size of a given dimension of a numpy array. Example A = numpy.zeros((10,20,30),float) The size of the second dimension of the array A is 20. Thanks. -- View this message

Re: [Numpy-discussion] Calling routines from a Fortran library using python

2010-02-18 Thread Matthieu Brucher
You may have to convert the .a library to a .so library. And this is where I hope that the library is compiled with fPIC (which is generally not the case for static libraries). If it is not the case, you will not be able to compile it as a shared library and thus not be able to use it from

Re: [Numpy-discussion] Calling routines from a Fortran library using python

2010-02-18 Thread Matthieu Brucher
Ok I have extracted the *.o files from the static library. Applying the file command to the object files yields ELF 64-bit LSB relocatable, AMD x86-64, version 1 (SYSV), not stripped What's that supposed to mean ? It means that each object file is an object file compiled with -fPIC, so

Re: [Numpy-discussion] Calling routines from a Fortran library using python

2010-02-18 Thread Matthieu Brucher
If header files are provided, the work done by f2py is almost done. But you don't know the real Fortran interface, so you still have to use ctypes over f2py. Matthieu 2010/2/18 George Nurser gnur...@googlemail.com: Hi Nils, I've not tried it, but you might be able to interface with f2py your

Re: [Numpy-discussion] Calling routines from a Fortran library using python

2010-02-18 Thread Matthieu Brucher
... --George. On 18 February 2010 10:56, Matthieu Brucher matthieu.bruc...@gmail.com wrote: If header files are provided, the work done by f2py is almost done. But you don't know the real Fortran interface, so you still have to use ctypes over f2py. Matthieu 2010/2/18 George Nurser gnur

Re: [Numpy-discussion] Calling routines from a Fortran library using python

2010-02-18 Thread Matthieu Brucher
2010/2/18 Christopher Barker chris.bar...@noaa.gov: Dag Sverre Seljebotn wrote: If it is not compiled with -fPIC, you can't statically link it into any shared library, it has to be statically linked into the final executable (so the standard /usr/bin/python will never work). Shows you what I

Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-22 Thread Matthieu Brucher
[1] BTW, I could not figure out how to link statically if I wanted -- is search_static_first = 1 supposed to work? Perhaps MKL will insist on loading some parts dynamically even then *shrug*. search_static_first is inherently fragile - using the linker to do this is much better (with

Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-21 Thread Matthieu Brucher
try:    import sys    import ctypes    _old_rtld = sys.getdlopenflags()    sys.setdlopenflags(_old_rtld|ctypes.RTLD_GLOBAL)    from numpy.linalg import lapack_lite finally:    sys.setdlopenflags(_old_rtld)    del sys; del ctypes; del _old_rtld This also applies to scipy code that relies

Re: [Numpy-discussion] Proposed fix for MKL and dynamic loading

2010-01-21 Thread Matthieu Brucher
2010/1/21 Dag Sverre Seljebotn da...@student.matnat.uio.no: Matthieu Brucher wrote: try:    import sys    import ctypes    _old_rtld = sys.getdlopenflags()    sys.setdlopenflags(_old_rtld|ctypes.RTLD_GLOBAL)    from numpy.linalg import lapack_lite finally:    sys.setdlopenflags(_old_rtld

Re: [Numpy-discussion] Waf or scons/numscons for a C/Fortran/Cython/Python project -- what's your recommendation?

2010-01-16 Thread Matthieu Brucher
Hi, SCons can also do configuration and installation steps. David made it possible to use SCons capabilities from distutils, but you can still make a C/Fortran/Cython/Python project with SCons. Matthieu 2010/1/16 Kurt Smith kwmsm...@gmail.com: My questions here concern those familiar with

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Matthieu Brucher
OK, I should have said Object-oriented SIMD API that is implemented using hardware SIMD instructions. No, I think you're right. Using SIMD to refer to numpy-like operations is an abuse of the term not supported by any outside community that I am aware of. Everyone else uses SIMD to describe

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Matthieu Brucher
Is it general, or just for simple operations in numpy and ufunc ? I remember that for music softwares, SIMD used to matter a lot, even for simple bus mixing (which is basically a ax+by with a, b scalars and x y the input arrays). Indeed, it shouldn't :| I think the main reason might not be

Re: [Numpy-discussion] MKL with 64bit crashes

2009-10-15 Thread Matthieu Brucher
Hi, You need to use the static libraries, are you sure you currently do? Matthieu 2009/10/15 Kashyap Ashwin ashwin.kash...@thomson.net: I followed the advice given by the Intel MKL link adviser (http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/) This is my new site.cfg:

Re: [Numpy-discussion] Fwd: GPU Numpy

2009-09-10 Thread Matthieu Brucher
Sure. Specially because NumPy is all about embarrasingly parallel problems (after all, this is how an ufunc works, doing operations element-by-element). The point is: are GPUs prepared to compete with a general-purpose CPUs in all-road operations, like evaluating transcendental functions,

Re: [Numpy-discussion] snow leopard and Numeric

2009-09-01 Thread Matthieu Brucher
Use Numpy instead of Numeric (no longer supported I think)? Matthieu 2009/9/1 Stefano Covino stefano_cov...@yahoo.it: Hello everybody, I have just upgraded my Mac laptop to snow leopard. However, I can no more compile Numeric 24.2. Here is my output:

Re: [Numpy-discussion] Accelerating NumPy computations [Was: GPU Numpy]

2009-08-21 Thread Matthieu Brucher
I personally think that, in general, exposing GPU capabilities directly to NumPy would provide little service for most NumPy users.  I rather see letting this task to specialized libraries (like PyCUDA, or special versions of ATLAS, for example) that can be used from NumPy. specialized

Re: [Numpy-discussion] Fwd: GPU Numpy

2009-08-06 Thread Matthieu Brucher
2009/8/6 Erik Tollerud erik.tolle...@gmail.com: Note that this is from a user perspective, as I have no particular plan of developing the details of this implementation, but I've thought for a long time that GPU support could be great for numpy (I would also vote for OpenCL support over cuda,

Re: [Numpy-discussion] (newbie) How can I use NumPy to wrap my C++ class with 2-dimensional arrays?

2009-07-30 Thread Matthieu Brucher
Hi, In fact, it's not that complicated. You may know the way how copying a vector, and this is all you need (http://matt.eifelle.com/2008/01/04/transforming-a-c-vector-into-a-numpy-array/). You will have to copy your data, it is the safest way to ensure that the data is always valid. For the

Re: [Numpy-discussion] (newbie) How can I use NumPy to wrap my C++ class with 2-dimensional arrays?

2009-07-30 Thread Matthieu Brucher
be avoided because I cannot simply change the library. regards Raymond Matthieu Brucher wrote: Hi, In fact, it's not that complicated. You may know the way how copying a vector, and this is all you need (http://matt.eifelle.com/2008/01/04/transforming-a-c-vector-into-a-numpy-array/). You

Re: [Numpy-discussion] (newbie) How can I use NumPy to wrap my C++ class with 2-dimensional arrays?

2009-07-30 Thread Matthieu Brucher
2009/7/30 Raymond de Vries ree...@zonnet.nl: Hi Indeed, the solution is as simple as this ;) The trouble is to find the information! Yes, there is so much information everywhere. And it's hard to make the first steps. For the std::vector[], I suggest you convert it to a single vector, as

Re: [Numpy-discussion] Optimizing reduction loops (sum(), prod(), et al.)

2009-07-09 Thread Matthieu Brucher
2009/7/9 Pauli Virtanen pav...@iki.fi: On 2009-07-08, Stéfan van der Walt ste...@sun.ac.za wrote: I know very little about cache optimality, so excuse the triviality of this question: Is it possible to design this loop optimally (taking into account certain build-time measurable parameters),

Re: [Numpy-discussion] performing operations in-place in numpy

2009-07-09 Thread Matthieu Brucher
2009/7/9 Citi, Luca lc...@essex.ac.uk: Hello The problem is not PyArray_Conjugate itself. The problem is that whenever you call a function from the C side and one of the inputs has ref_count 1, it can be overwritten. This is not a problem from the python side because if the ufunc sees a

Re: [Numpy-discussion] Optimizing reduction loops (sum(), prod(), et al.)

2009-07-09 Thread Matthieu Brucher
2009/7/9 David Cournapeau da...@ar.media.kyoto-u.ac.jp: Matthieu Brucher wrote: Unfortunately, this is not possible. We've been playing with blocking loops for a long time in finite difference schemes, and it is always compiler dependent You mean CPU dependent, right ? I can't see how

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-09 Thread Matthieu Brucher
2009/6/9 Robin robi...@gmail.com: On Mon, Jun 8, 2009 at 7:14 PM, David Warde-Farleyd...@cs.toronto.edu wrote: On 8-Jun-09, at 8:33 AM, Jason Rennie wrote: Note that EM can be very slow to converge: That's absolutely true, but EM for PCA can be a life saver in cases where diagonalizing (or

Re: [Numpy-discussion] second 2d fft gives the same result as fft+ifft

2009-06-09 Thread Matthieu Brucher
Hi, Is it really ? You only show the imaginary part of the FFT, so you can't be sure of what you are saying. Don't forget that the only difference between FFT and iFFT is (besides of teh scaling factor) a minus sign in the exponent. Matthieu 2009/6/9 bela bela.miha...@gmail.com: I tried to

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-08 Thread Matthieu Brucher
2009/6/8 Gael Varoquaux gael.varoqu...@normalesup.org: On Mon, Jun 08, 2009 at 12:29:08AM -0400, David Warde-Farley wrote: On 7-Jun-09, at 6:12 AM, Gael Varoquaux wrote: Well, I do bootstrapping of PCAs, that is SVDs. I can tell you, it makes a big difference, especially since I have 8

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-08 Thread Matthieu Brucher
2009/6/8 Gael Varoquaux gael.varoqu...@normalesup.org: On Mon, Jun 08, 2009 at 08:58:29AM +0200, Matthieu Brucher wrote: Given the number of PCs, I think you may just be measuring noise. As said in several manifold reduction publications (as the ones by Torbjorn Vik who published on robust PCA

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-08 Thread Matthieu Brucher
2009/6/8 David Warde-Farley d...@cs.toronto.edu: On 8-Jun-09, at 1:17 AM, David Cournapeau wrote: I would not be surprised if David had this paper in mind :) http://www.cs.toronto.edu/~roweis/papers/empca.pdf Right you are :) There is a slight trick to it, though, in that it won't

Re: [Numpy-discussion] scipy 0.7.1rc2 released

2009-06-08 Thread Matthieu Brucher
2009/6/8 Matthieu Brucher matthieu.bruc...@gmail.com: I'm trying to compile it with ICC 10.1.018, and it fails :| icc: scipy/special/cephes/const.c scipy/special/cephes/const.c(94): error: floating-point operation result is out of range  double INFINITY = 1.0/0.0;  /* 99e999

Re: [Numpy-discussion] scipy 0.7.1rc2 released

2009-06-08 Thread Matthieu Brucher
I'm trying to compile it with ICC 10.1.018, and it fails :| icc: scipy/special/cephes/const.c scipy/special/cephes/const.c(94): error: floating-point operation result is out of range double INFINITY = 1.0/0.0; /* 99e999; */ ^ scipy/special/cephes/const.c(99): error:

Re: [Numpy-discussion] scipy 0.7.1rc2 released

2009-06-08 Thread Matthieu Brucher
2009/6/8 David Cournapeau da...@ar.media.kyoto-u.ac.jp: Matthieu Brucher wrote: I'm trying to compile it with ICC 10.1.018, and it fails :| icc: scipy/special/cephes/const.c scipy/special/cephes/const.c(94): error: floating-point operation result is out of range   double INFINITY = 1.0/0.0

Re: [Numpy-discussion] scipy 0.7.1rc2 released

2009-06-08 Thread Matthieu Brucher
Good luck with fixing this then :| I've tried to build scipy with the MKL and ATLAS, and I have in both cases a segmentation fault. With the MKL, it is the same as in a previous mail, and for ATLAS it is there: Regression test for #946. ... Segmentation fault A bad ATLAS compilation? Matthieu

Re: [Numpy-discussion] scipy 0.7.1rc2 released

2009-06-08 Thread Matthieu Brucher
2009/6/8 David Cournapeau da...@ar.media.kyoto-u.ac.jp: Matthieu Brucher wrote: Good luck with fixing this then :| I've tried to build scipy with the MKL and ATLAS, and I have in both cases a segmentation fault. With the MKL, it is the same as in a previous mail, and for ATLAS

  1   2   3   4   >