[Numpy-discussion] PATCH: reference leaks for 'numpy.core._internal' module object

2010-07-02 Thread Lisandro Dalcin
The simple test below show the issue. import sys import numpy as np from numpy.core import _internal def f(a = np.zeros(4)): a = np.zeros(4) b = memoryview(a) c = np.asarray(b) print sys.getrefcount(_internal) while 1: f() The patch it trivial (I've added a little extra, unr

Re: [Numpy-discussion] cython and f2py

2010-07-02 Thread Matthew Brett
Hi, > Can numpy.distutils be directed to process *.pyx with Cython rather than > Pyrex? Yes, but at the moment I believe you have to monkey-patch numpy distutils : see the top of http://github.com/matthew-brett/nipy/blob/master/setup.py and "generate_a_pyrex_source" around line 289 of: http:/

Re: [Numpy-discussion] cython and f2py

2010-07-02 Thread Keith Goodman
On Fri, Jul 2, 2010 at 12:53 PM, Geoffrey Ely wrote: > Hi All, > > Sorry if this has been documented or discussed already, but my searches have > come up short. Can someone please recommend a way to setup both Cython and > Fortran extensions in a single package with numpy.distutils (or something

[Numpy-discussion] cython and f2py

2010-07-02 Thread Geoffrey Ely
Hi All, Sorry if this has been documented or discussed already, but my searches have come up short. Can someone please recommend a way to setup both Cython and Fortran extensions in a single package with numpy.distutils (or something else)? E.g.: from numpy.distutils.core import setup, Extensi

Re: [Numpy-discussion] [Matplotlib-users] Vectorization

2010-07-02 Thread Geoffrey Ely
On Jul 2, 2010, at 11:33 AM, Benjamin Root wrote: > I want to do the same for the calculation of the kinetic energy: > /2m. There is a laplacian in the volume integral which > complicates things: > K = 0.0 > for i in numpy.arange(len(dx)-1): > for j in numpy.arange(len(dy)-1): > for k

Re: [Numpy-discussion] [Matplotlib-users] Vectorization

2010-07-02 Thread Bruce Southey
On 07/02/2010 01:45 PM, Keith Goodman wrote: > On Fri, Jul 2, 2010 at 11:33 AM, Benjamin Root wrote: > >> I am moving this over to numpy-discussion maillist... >> >> I don't have a firm answer for you, but I did notice one issue in your >> code. You call arange(len(dx) - 1) for your loops, bu

Re: [Numpy-discussion] [Matplotlib-users] Vectorization

2010-07-02 Thread Keith Goodman
On Fri, Jul 2, 2010 at 11:45 AM, Keith Goodman wrote: > On Fri, Jul 2, 2010 at 11:33 AM, Benjamin Root wrote: >> I am moving this over to numpy-discussion maillist... >> >> I don't have a firm answer for you, but I did notice one issue in your >> code.  You call arange(len(dx) - 1) for your loops

Re: [Numpy-discussion] [Matplotlib-users] Vectorization

2010-07-02 Thread Keith Goodman
On Fri, Jul 2, 2010 at 11:33 AM, Benjamin Root wrote: > I am moving this over to numpy-discussion maillist... > > I don't have a firm answer for you, but I did notice one issue in your > code.  You call arange(len(dx) - 1) for your loops, but you probably really > need arange(1, len(dx) - 1) becau

Re: [Numpy-discussion] [Matplotlib-users] Vectorization

2010-07-02 Thread Benjamin Root
I am moving this over to numpy-discussion maillist... I don't have a firm answer for you, but I did notice one issue in your code. You call arange(len(dx) - 1) for your loops, but you probably really need arange(1, len(dx) - 1) because you are accessing elements both after *and* before the curren

Re: [Numpy-discussion] OT: request help building pymex win64

2010-07-02 Thread David Cournapeau
On Sat, Jul 3, 2010 at 1:58 AM, Robin wrote: > On Fri, Jul 2, 2010 at 5:47 PM, David Cournapeau wrote: >> >> The problem may be that matlab is built with one runtime, and Python >> with another Unless your matlab is very recent, it is actually >> quite likely to be compiled with VS 2005, whic

Re: [Numpy-discussion] OT: request help building pymex win64

2010-07-02 Thread Ken Watford
That's an excellent point. I've noticed on my (Linux) workstation that pymex works fine, but PyCUDA fails to import properly, because PyCUDA is a Boost::Python project and expects a different libstdc++ than the one that MATLAB jams into its LD_LIBRARY_PATH. (I got around this using an evil LD_PRELO

Re: [Numpy-discussion] OT: request help building pymex win64

2010-07-02 Thread Robin
On Fri, Jul 2, 2010 at 5:47 PM, David Cournapeau wrote: > > The problem may be that matlab is built with one runtime, and Python > with another Unless your matlab is very recent, it is actually > quite likely to be compiled with VS 2005, which means you should use > python 2.5 instead (or buil

Re: [Numpy-discussion] OT: request help building pymex win64

2010-07-02 Thread David Cournapeau
On Sat, Jul 3, 2010 at 1:37 AM, Robin wrote: > Hi, > > Sorry for the offtopic post but I wondered if any Windows experts who > are familiar with topics like linking python on windows and visual > studio runtimes etc. might be able to help. > > I'm on a bit of a mission to get pymex built for 64 bi

[Numpy-discussion] OT: request help building pymex win64

2010-07-02 Thread Robin
Hi, Sorry for the offtopic post but I wondered if any Windows experts who are familiar with topics like linking python on windows and visual studio runtimes etc. might be able to help. I'm on a bit of a mission to get pymex built for 64 bit windows. Pymex ( http://github.com/kw/pymex ) is a matla

Re: [Numpy-discussion] memory leak using numpy and cvxopt

2010-07-02 Thread Pauli Virtanen
Fri, 02 Jul 2010 14:56:47 +0200, Tillmann Falck wrote: > I am hitting a memory leak with the combination of numpy and > cvxopt.matrix. As I am not where it occurs, I am cross posting. Probably a bug in cvxopt, as also the following leaks memory: from cvxopt import

Re: [Numpy-discussion] [ANN] Bento (ex-toydist) 0.0.3

2010-07-02 Thread Matthew Brett
Hi, > Can you copyright a word ? I thought this was the trademark part of > the law. For example, "linux" is a trademark owned by Linus Torvald. > Also, well known packages use words which are at least as common as > bento in English (sphinx, twisted, etc...), and as likely to be > trademarked. I

Re: [Numpy-discussion] [ANN] Bento (ex-toydist) 0.0.3

2010-07-02 Thread Robert Pyle
On Jul 2, 2010, at 1:11 AM, David Cournapeau wrote: > On Fri, Jul 2, 2010 at 1:56 PM, Robert Pyle > wrote: >> Hi, >> >> While I agree that toydist needs a new name, Bento might not be a >> good >> choice. It's already the name of a database system for Macintosh >> from >> Filemaker, an Ap

[Numpy-discussion] memory leak using numpy and cvxopt

2010-07-02 Thread Tillmann Falck
Hi all, I am hitting a memory leak with the combination of numpy and cvxopt.matrix. As I am not where it occurs, I am cross posting. On my machine (Fedora 13, x86_64) this example quickly eats up all my memory. --- from cvxopt import matrix import numpy as np N = 2000 X = np.ones((N,

Re: [Numpy-discussion] [ANN] Bento (ex-toydist) 0.0.3

2010-07-02 Thread David
On 07/02/2010 05:05 PM, Dag Sverre Seljebotn wrote: > David Cournapeau wrote: >> On Fri, Jul 2, 2010 at 1:56 PM, Robert Pyle wrote: >> >>> Hi, >>> >>> While I agree that toydist needs a new name, Bento might not be a good >>> choice. It's already the name of a database system for Macintosh from >

Re: [Numpy-discussion] [ANN] Bento (ex-toydist) 0.0.3

2010-07-02 Thread Dag Sverre Seljebotn
David Cournapeau wrote: > On Fri, Jul 2, 2010 at 1:56 PM, Robert Pyle wrote: > >> Hi, >> >> While I agree that toydist needs a new name, Bento might not be a good >> choice. It's already the name of a database system for Macintosh from >> Filemaker, an Apple subsidiary. I'd be *very* surprise

[Numpy-discussion] Ternary plots anywhere?

2010-07-02 Thread V. Armando Solé
Dear all, Perhaps this is a bit off topic for the mailing list, but this is probably the only mailing list that is common to users of all python plotting packages. I am trying to find a python implementation of ternary/triangular plots: http://en.wikipedia.org/wiki/Ternary_plot but I have bee