Nope this one wouldn't have worked for me, it's basically axis=-1
but there might be additional dimensions after index
C.
On Nov 12, 2008, at 10:43 AM, Roberto De Almeida wrote:
On Wed, Nov 12, 2008 at 4:36 PM, Gabriel Gellner
<[EMAIL PROTECTED]> wrote:
On Wed, Nov 12, 2008 at 12:34:51PM -060
Charles سمير Doutriaux wrote:
> Hello,
>
> I'm wondering if there's aquick way to do the following:
>
> s[:,5]=value
>
> in a "general" function
> def setval(array,index,value,axis=0):
> ## code here
Assuming that axis specifies where the index goes, that would be:
def setval(array, inde
On Wed, Nov 12, 2008 at 4:36 PM, Gabriel Gellner <[EMAIL PROTECTED]>wrote:
> On Wed, Nov 12, 2008 at 12:34:51PM -0600, Ryan May wrote:
> > Charles سمير Doutriaux wrote:
> > > Hello,
> > >
> > > I'm wondering if there's aquick way to do the following:
> > >
> > > s[:,5]=value
> > >
> > > in a "gene
Thx!
On Nov 12, 2008, at 10:36 AM, Gabriel Gellner wrote:
> On Wed, Nov 12, 2008 at 12:34:51PM -0600, Ryan May wrote:
>> Charles سمير Doutriaux wrote:
>>> Hello,
>>>
>>> I'm wondering if there's aquick way to do the following:
>>>
>>> s[:,5]=value
>>>
>>> in a "general" function
>>> def setval(arr
On Wed, Nov 12, 2008 at 12:34:51PM -0600, Ryan May wrote:
> Charles سمير Doutriaux wrote:
> > Hello,
> >
> > I'm wondering if there's aquick way to do the following:
> >
> > s[:,5]=value
> >
> > in a "general" function
> > def setval(array,index,value,axis=0):
> > ## code here
>
> Assuming
On Wed, Nov 12, 2008 at 09:43:34AM -0800, Charles سمير Doutriaux wrote:
> Hello,
>
> I'm wondering if there's aquick way to do the following:
>
> s[:,5]=value
>
> in a "general" function
> def setval(array,index,value,axis=0):
> ## code here
>
> The issue is to put enough ":" before the i
Hello,
I'm wondering if there's aquick way to do the following:
s[:,5]=value
in a "general" function
def setval(array,index,value,axis=0):
## code here
The issue is to put enough ":" before the index value inside the
square bracket of the assignement.
Thanks,
C.
___
On Monday 25 June 2007 10:14:21 Jesper Larsen wrote:
> Hi Pierre and others,
> I was not aware that the way to use masked arrays was as you describe. I
> thought you had to somehow modify the mask (but the method you describe is
> of course much more elegant). Thanks for answering my very basic qu
Hi Pierre and others,
On Monday 25 June 2007 15:37, Pierre GM wrote:
> On Monday 25 June 2007 05:12:01 Jesper Larsen wrote:
> > myarray.mask[i] = True
>
> Mmh. Experience shows that directly accessing the mask can lead to bad
> surprises. To mask a series of values in an array, the easiest (and
>
On Monday 25 June 2007 05:12:01 Jesper Larsen wrote:
> Hi numpy users,
>
> I have a masked array. I am looping over the elements of this array and
> sometimes want to set a value to missing. Normally this can be done by:
>
> myarray.mask[i] = True
Mmh. Experience shows that directly accessing the
Hi numpy users,
I have a masked array. I am looping over the elements of this array and
sometimes want to set a value to missing. Normally this can be done by:
myarray.mask[i] = True
However the mask attribute is not indexable when there are no existing missing
values in the array (it is simpl
11 matches
Mail list logo