It seems to be working now--I think my problem is elsewhere. Sorry...
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Thank you! That answered things quite nicely. My apologies for not finding
the earlier discussion before sending out the question...
Thanks again,
-Joe
On Sat, Jun 13, 2009 at 7:17 PM, Robert Kern wrote:
> On Sat, Jun 13, 2009 at 19:11, Joe Kington wrote:
> > Hi folks,
> >
> > This is probably
On Sat, Jun 13, 2009 at 19:11, Joe Kington wrote:
> Hi folks,
>
> This is probably a very simple question, but it has me stumped...
>
> I have an integer 2D array containing 3rd dimesion indicies that I'd like to
> use to index values in a 3D array.
>
> Basically, I want the equivalent of:
>
>> out
Hi folks,
This is probably a very simple question, but it has me stumped...
I have an integer 2D array containing 3rd dimesion indicies that I'd like to
use to index values in a 3D array.
Basically, I want the equivalent of:
> output = np.zeros((ny,nx))
>
> for i in xrange(ny):
> for j in x
Are new functions automatically added to the Numpy Doc Wiki? In particular: 0)
is the documentation itself (assuming there is some) added in such a way that
it can be edited by Wiki users; and 1) is the name of the function
automatically added to a "best guess" category in the Milestones? If
--- On Sat, 6/13/09, Charles R Harris wrote:
> Some nitpicks:
>
> 3) Documentation is needed. In particular, I think it worth
> mentioning that the number of bounds is taken from the
> PyArrayIterObject, which isn't the most transparent
> thing.
OP's recognition of this need acknowledged, I ha
On Sat, Jun 13, 2009 at 12:29 PM, David Cournapeau wrote:
> On Sun, Jun 14, 2009 at 3:00 AM, Charles R
> Harris wrote:
> >
> >
> > On Sat, Jun 13, 2009 at 7:46 AM, David Cournapeau
> > wrote:
> >>
> >> Hi,
> >>
> >>I have cleaned up a bit the code, and would like to suggest the
> >> inclusion
On Sat, Jun 13, 2009 at 12:35 PM, David Cournapeau wrote:
> On Sun, Jun 14, 2009 at 3:22 AM, Charles R
> Harris wrote:
>
> > 1) Since reference counting is such a pain, you should document that the
> > constructor returns a new reference and that the PyArrayIterObject does
> not
> > need to have i
On Sun, Jun 14, 2009 at 3:22 AM, Charles R
Harris wrote:
> 1) Since reference counting is such a pain, you should document that the
> constructor returns a new reference and that the PyArrayIterObject does not
> need to have its reference count incremented before the call and that the
> reference
On Sun, Jun 14, 2009 at 3:00 AM, Charles R
Harris wrote:
>
>
> On Sat, Jun 13, 2009 at 7:46 AM, David Cournapeau
> wrote:
>>
>> Hi,
>>
>> I have cleaned up a bit the code, and would like to suggest the
>> inclusion of a neighborhood iterator for numpy. Stéfan took a look at it
>> already, but i
On Sat, Jun 13, 2009 at 12:00 PM, Charles R Harris <
charlesr.har...@gmail.com> wrote:
>
>
> On Sat, Jun 13, 2009 at 7:46 AM, David Cournapeau <
> da...@ar.media.kyoto-u.ac.jp> wrote:
> >
> > Hi,
> >
> >I have cleaned up a bit the code, and would like to suggest the
> > inclusion of a neighbor
On Sat, Jun 13, 2009 at 7:46 AM, David Cournapeau <
da...@ar.media.kyoto-u.ac.jp> wrote:
>
> Hi,
>
>I have cleaned up a bit the code, and would like to suggest the
> inclusion of a neighborhood iterator for numpy. Stéfan took a look at it
> already, but it needs more eyeballs. It is a "subclass
Hi,
I have cleaned up a bit the code, and would like to suggest the
inclusion of a neighborhood iterator for numpy. Stéfan took a look at it
already, but it needs more eyeballs. It is a "subclass" of
PyArrayIterObject, and can be used to iterate over a neighborhood of a
point (handling boundar
On Sat, Jun 13, 2009 at 5:51 AM, fred wrote:
> Emmanuelle Gouillart a écrit :
>> Hi Fred,
> Hi Manue ;-)
>
>> here is another solution
> A = np.arange(99).reshape((33,3)
> mask = (A==np.array([0,1,2]))
> np.nonzero(np.prod(mask, axis=1))[0]
>> array([0]
>>
>> I found it to be less elega
Emmanuelle Gouillart a écrit :
> Hi Fred,
Hi Manue ;-)
> here is another solution
A = np.arange(99).reshape((33,3)
mask = (A==np.array([0,1,2]))
np.nonzero(np.prod(mask, axis=1))[0]
> array([0]
>
> I found it to be less elegant than Josef's solution changing the dtype of
> the arra
Hi Fred,
here is another solution
>>> A = np.arange(99).reshape((33,3)
>>> mask = (A==np.array([0,1,2]))
>>> np.nonzero(np.prod(mask, axis=1))[0]
array([0]
I found it to be less elegant than Josef's solution changing the dtype of
the array, but it may be easier to understand if you're not very fa
josef.p...@gmail.com a écrit :
> something like this should work to find rows with specific elements,
> if I understand you correctly.
You did ;-)
> np.nonzero(A.view([('',float)]*3) == np.array((1,2,3),[('',float)]*3))[0]
>
> It creates an extra dimension, that needs to be removed with [0], but
17 matches
Mail list logo