Re: [Numpy-discussion] Indexing and lookup issues

2010-09-22 Thread Ross Williamson
Thank you Anne I was doing something totally stupid at my end. Ross On Wed, Sep 22, 2010 at 3:42 PM, Anne Archibald wrote: > On 22 September 2010 16:38, Ross Williamson > wrote: >> Hi everyone >> >> I suspect this is easy but I'm stuck >> >> s

[Numpy-discussion] Indexing and lookup issues

2010-09-22 Thread Ross Williamson
easy way to do this in numpy? Cheers Ross -- Ross Williamson University of Chicago Department of Astronomy & Astrophysics 773-834-9785 (office) 312-504-3051 (Cell) ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.or

[Numpy-discussion] range in numpy where

2009-01-22 Thread Ross Williamson
Hi All I want to get out the index of values in an array. Normally WHERE works fine for one conditional statement but it does not work for two - i.e. a = array([0,1,2,3,4,5,6,7,8,9]) ind, = where(a > 5) Works fine but if I wanted: ind = where((a > 5) and (a<8)) Then it bugs out with the f

[Numpy-discussion] Save a class

2008-12-12 Thread Ross Williamson
Dear all I have a class that contains various data arrays and constants Is there a way of using numpy.save() to save the class so that when I reload it back in I have access to all the member arrays? Thanks Ross ___ Numpy-discussion mailing list Nu

Re: [Numpy-discussion] Find index of repeated numbers in array

2008-12-10 Thread Ross Williamson
Thanks all I was being dumb and forgot to initialize as array() Cheers Ross On Dec 10, 2008, at 11:47 AM, Sturla Molden wrote: > On 12/10/2008 5:38 PM, Ross Williamson wrote: >> Hi Everyone >> >> I think I'm missing something really obvious but what I would like to &g

[Numpy-discussion] Find index of repeated numbers in array

2008-12-10 Thread Ross Williamson
Hi Everyone I think I'm missing something really obvious but what I would like to do is extract the indexes from an array where a number matches - For example data = [0,1,2,960,5,6,960,7] I would like to know, for example the indices which match 960 - i.e. it would return 3 and 6 I could