Re: [Numpy-discussion] Implementing a find first style function

2013-03-28 Thread Phil Elson
I've specifically not tuned it, primarily because the get the best tuning
you need to know the likelihood of finding a match. One option would be to
allow users to specify a probability parameter which would chunk the
array into size*probability chunks - an additional parameter could then be
exposed to limit the maximum chunk size to give the user control of the
maximum memory overhead that the routine could use.

I'll submit a PR and we can discuss inline.

Thanks for the response Nathaniel.





On 27 March 2013 12:19, Nathaniel Smith n...@pobox.com wrote:

 On Tue, Mar 26, 2013 at 9:20 AM, Phil Elson pelson@gmail.com wrote:
  Bump.
 
  I'd be interested to know if this is a desirable feature for numpy?
  (specifically the 1D find functionality rather than the any/all
 also
  discussed)
  If so, I'd be more than happy to submit a PR, but I don't want to put in
 the
  effort if the principle isn't desirable in the core of numpy.

 I don't think anyone has a strong opinion either way :-). It seems
 like a fairly general interface that people might find useful, so I
 don't see an immediate objection to including it in principle. It
 would help to see the actual numbers from a tuned version though to
 know how much benefit there is to get...

 -n
 ___
 NumPy-Discussion mailing list
 NumPy-Discussion@scipy.org
 http://mail.scipy.org/mailman/listinfo/numpy-discussion

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] [numfocus] Growing the contributor base of Numpy

2013-03-28 Thread David Cournapeau
On Wed, Mar 27, 2013 at 8:45 PM, Jonathan Rocher jroc...@enthought.com wrote:
 Awesome Ralf!

 And thanks David C. for being available for the US one. When you say you
 would like to be part of it, did you mean an advanced tutorial or a sprint?

I meant I would be happy to contribute to a tutorial in the spirit of
dive into numpy code. I would prefer if we were two doing it,
though.

David
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] inheriting from recarray with nested dtypes

2013-03-28 Thread Geoffrey Irving
I have the following two structured dtypes:

rotation (quaternion) = dtype([('s','f8'),('v','3f8')])
frame = dtype([('t','3f8'),('r',rotation)])

For various reasons, I usually store rotation arrays in a class
Rotations deriving from ndarray, and frames in a class Frames deriving
from ndarray.

Currently I am defining .s, .v, .t, and .r properties manually, and
I'd like to switch to inheriting from recarray.  However, the .r
property should return an array of class Rotations.  I.e.,

f = Frames(...) # f.dtype = frame
r = f.r # r.dtype = rotation, type(r) = Rotations

Is there a clean way to tell recarray to adjust the type returned?  It
already has a bit of intelligence there, since it returns ndarray vs.
recarray based on whether the returned dtype has fields.

The full code is here in case anyone is curious:

https://github.com/otherlab/core/blob/master/vector/Frame.py
https://github.com/otherlab/core/blob/master/vector/Rotation.py

Thanks,
Geoffrey
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Any plans for windows 64-bit installer for 1.7?

2013-03-28 Thread Ondřej Čertík
Hi Matthew,

On Tue, Mar 26, 2013 at 5:48 PM, Matthew Brett matthew.br...@gmail.com wrote:
 Hi Ondrej,

 On Thu, Feb 7, 2013 at 3:18 PM, Ondřej Čertík ondrej.cer...@gmail.com wrote:
 On Thu, Feb 7, 2013 at 12:29 PM, Chris Barker - NOAA Federal
 chris.bar...@noaa.gov wrote:
 On Thu, Feb 7, 2013 at 11:38 AM, Matthew Brett matthew.br...@gmail.com 
 wrote:
 a) If we cannot build Scipy now, it may or may not be acceptable to
 release numpy now.  I think it is, you (Ralf) think it isn't, we
 haven't discussed that.  It may not come up.

 Is anyone suggesting we hold the whole release for this? I fnot, then

 Just to make it clear, I do not plan to hold the whole release because of 
 this.
 Previous releases also didn't have this official 64bit Windows binary,
 so there is
 no regression.

 Once we figure out how to create 64bit binaries, then we'll start
 uploading them.

 Did you make any progress with this?  Worth making some notes?
 Anything we can do to help?

Unfortunately I've been too busy the last month to push this through,
so right now I am just concentrating on getting 1.7.1 out of the door,
as that is higher priority.

I am starting a new job on Monday, so once things settle down, I
should be able to get back to this. I will post notes once I get to
this again.

Ondrej
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion