Re: [Numpy-discussion] Numpy helper function for __getitem__?

2015-08-29 Thread Phil Elson
Biggus also has such a function: https://github.com/SciTools/biggus/blob/master/biggus/__init__.py#L2878 It handles newaxis outside of that function in: https://github.com/SciTools/biggus/blob/master/biggus/__init__.py#L537. Again, it only aims to deal with orthogonal array indexing, not numpy

Re: [Numpy-discussion] Teaching Scipy BoF at SciPy

2014-07-04 Thread Phil Elson
Nice idea. Just a repository of courses would be a great first step. For example, I know Jake Vanderplas's course at https://github.com/jakevdp/2013_fall_ASTR599 is useful, and I have a few introduction (3hr) courses at https://github.com/SciTools/courses. On 3 July 2014 16:59, Chris Barker

[Numpy-discussion] [JOB] Scientific software engineer at the Met Office

2014-05-15 Thread Phil Elson
I just wanted to let you know that there is currently a vacancy for a full-time developer at the Met Office, the UK's National Weather Service, within our Analysis, Visualisation and Data (AVD) team. I'm posting on this list as the Met Office's AVD team are heavily involved in the development of

Re: [Numpy-discussion] fast_any_all , a trivial but fast/useful helper function for numpy

2013-09-04 Thread Phil Elson
For the record, I started a discussion about 6 months ago about a find_first type function which avoided running the logic over the whole array (using lambdas instead). This spilled into a discussion about implementing a short-cutted any or all function:

Re: [Numpy-discussion] Proposal of new function: iteraxis()

2013-04-26 Thread Phil Elson
I didn't find the rollaxis solution particularly obvious and also had to think about what rollaxis did before understanding its usefulness for iteration. Now that I've understood it, I'm +1 for the statement that, as it stands, the proposed iteraxis method doesn't add enough to warrant its

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

2013-03-28 Thread Phil Elson
, 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

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

2013-03-26 Thread Phil Elson
. Cheers, On 8 March 2013 17:38, Phil Elson pelson@gmail.com wrote: Interesting. I hadn't thought of those. I've implemented (very roughly without a sound logic check) and benchmarked: def my_any(a, predicate, chunk_size=2048): try: next(find(a, predicate, chunk_size

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

2013-03-08 Thread Phil Elson
my_all(a, lambda a: np.abs(a) 1) 1 loops, best of 3: 73.6 us per loop On 6 March 2013 21:16, Benjamin Root ben.r...@ou.edu wrote: On Tue, Mar 5, 2013 at 9:15 AM, Phil Elson pelson@gmail.com wrote: The ticket https://github.com/numpy/numpy/issues/2269 discusses the possibility

[Numpy-discussion] Implementing a find first style function

2013-03-05 Thread Phil Elson
The ticket https://github.com/numpy/numpy/issues/2269 discusses the possibility of implementing a find first style function which can optimise the process of finding the first value(s) which match a predicate in a given 1D array. For example: a = np.sin(np.linspace(0, np.pi, 200)) print