Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-23 Thread Luis Pedro Coelho
y is a speed difference or not, > >> etc. (If we do add a copyúlse option, then I guarantee many people > >> will use it religiously "just in case" the speed difference is enough > >> to matter! And that would suck for them.) > >> > >> Returning

Re: [Numpy-discussion] C++ Example

2012-03-04 Thread Luis Pedro Coelho
really the kind of code that should be done in cython, as it is mostly > about wrapping C code into the python C API. At least last time I read up on it, cython was not able to do multi-type code, i.e., have code that works on arrays of multiple types. Does it support it now? Best, -- Luis Pedr

[Numpy-discussion] C++ Example

2012-03-03 Thread Luis Pedro Coelho
t) { NI_FreeCoordinateList(*coordinate_list); *coordinate_list = NULL; } return 0; } else { return 1; } return PyErr_Occurred() ? 0 : 1; } HTH -- Luis Pedro Coelho | Institute for Molecular Medicine | http://luispedro.org signature.as

[Numpy-discussion] As any array, really any array

2011-08-15 Thread Luis Pedro Coelho
array. Otherwise, default to having it be an array of dtype=object. Is there a more elegant way to do it with numpy? Thank you, -- Luis Pedro Coelho | Carnegie Mellon University | http://luispedro.org signature.asc Description: This is a digitally signed message part

Re: [Numpy-discussion] Adjacent matrix

2011-06-14 Thread Luis Pedro Coelho
On Tuesday, June 14, 2011 08:50:47 AM Thiago Franco Moraes wrote: > On Tue, Jun 14, 2011 at 8:06 AM, Luis Pedro Coelho wrote: > > On Monday, June 13, 2011 03:55:46 PM Thiago Franco Moraes wrote: > >> "Find all of the grid points in that lie adjacent to one or more grid

Re: [Numpy-discussion] Adjacent matrix

2011-06-14 Thread Luis Pedro Coelho
On Monday, June 13, 2011 03:55:46 PM Thiago Franco Moraes wrote: > "Find all of the grid points in that lie adjacent to one or more grid > points of opposite values." > > This is the code used to calculate that matrix: [spin] > Where nx, ny and nz are the x, y, z dimensions from the "im" input > b

[Numpy-discussion] ANN: Mahotas 0.6.4

2011-04-07 Thread Luis Pedro Coelho
hon.org/mahotas/ *Mailing List*: Use the pythonvision mailing list http://groups.google.com/group/pythonvision?pli=1 for questions, bug submissions, etc. *Author*: Luis Pedro Coelho (with code by Zachary Pincus [from scikits.image], Peter J. Verveer [from scipy.ndimage], and Davis King [from dlib] *

Re: [Numpy-discussion] ANNOUNCE: mahotas 0.5

2010-09-11 Thread Luis Pedro Coelho
On Friday, September 10, 2010 03:40:33 am Sebastian Haase wrote: > Hi Luis, > > thanks for the announcement. How would you compare mahotas to scipy's > ndimage ? Are you using ndimage in mahotas at all ? Hi Sebastian, In general there is little overlap (there are 1 or 2 functions which are repl

[Numpy-discussion] ANNOUNCE: mahotas 0.5

2010-09-09 Thread Luis Pedro Coelho
general including this package): http://groups.google.com/group/pythonvision -- Luis Pedro Coelho | Carnegie Mellon University | http://luispedro.org ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] Thoughts on persistence/object tracking in scientific code

2008-12-29 Thread Luis Pedro Coelho
Hello all, On Monday 29 December 2008 17:40:07 Gael Varoquaux wrote: > It is interesting to see that you take a slightly different approach than > the others already discussed. This probably stems from the fact that you > are mostly interested by parallelism, whereas there are other adjacent > pro

Re: [Numpy-discussion] Thoughts on persistence/object tracking in scientific code

2008-12-29 Thread Luis Pedro Coelho
On Monday 29 December 2008 14:51:48 Luis Pedro Coelho wrote: > I will make the git repository publicly available once I figure out how to > do that. You can get my code with: git clone http://coupland.cbi.cmu.edu/jug As I said, I consider this alpha code and am only making it publicly ava

Re: [Numpy-discussion] Thoughts on persistence/object tracking in scientific code

2008-12-29 Thread Luis Pedro Coelho
Hello, I coincidently started my own implementation of a system to manage intermediate results last week, which I called jug. I wasn't planning to make such an alpha version public just now, but it seems to be on topic. The main idea is to use hashes to map function arguments to paths on the f

Re: [Numpy-discussion] No Copy Reduce Operations

2008-07-29 Thread Luis Pedro Coelho
Travis E. Oliphant wrote: > Your approach using C++ templates is interesting, and I'm very glad for > your explanation and your releasing of the code as open source.I'm > not prepared to start using C++ in NumPy, however, so your code will > have to serve as an example only. I will keep th

[Numpy-discussion] No Copy Reduce Operations

2008-07-26 Thread Luis Pedro Coelho
Hello all, Numpy arrays come with several reduce operations: sum(), std(), argmin(), min(), The traditional implementation of these suffers from two big problems: It is slow and it often allocates intermediate memory. I have code that is failing with OOM (out of memory) exceptions in call