2008/5/2 Chris.Barker <[EMAIL PROTECTED]>:
> Hi all,
>
> I have a n X m X 3 array, and I a n X M array. I want to assign the
> values in the n X m to all three of the slices in the bigger array:
>
> A1 = np.zeros((5,4,3))
> A2 = np.ones((5,4))
> A1[:,:,0] = A2
> A1[:,:,1] = A2
> A1[:,:,2] =
On Thu, May 1, 2008 at 10:58 PM, Chris.Barker <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a n X m X 3 array, and I a n X M array. I want to assign the
> values in the n X m to all three of the slices in the bigger array:
>
> A1 = np.zeros((5,4,3))
> A2 = np.ones((5,4))
> A1[:,:,0] = A2
> A1[:,
Hi all,
I have a n X m X 3 array, and I a n X M array. I want to assign the
values in the n X m to all three of the slices in the bigger array:
A1 = np.zeros((5,4,3))
A2 = np.ones((5,4))
A1[:,:,0] = A2
A1[:,:,1] = A2
A1[:,:,2] = A2
However,it seems I should be able to broadcast that, so I don't
Okay, thanks! I didn't check.
--Hoyt
On Thu, May 1, 2008 at 7:00 PM, Charles R Harris
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Thu, May 1, 2008 at 7:49 PM, Hoyt Koepke <[EMAIL PROTECTED]> wrote:
> > To be honest, this doesn't seem justifiable.
> >
> > Where it got me is interfacing with c-code that
On Thu, May 1, 2008 at 7:49 PM, Hoyt Koepke <[EMAIL PROTECTED]> wrote:
> To be honest, this doesn't seem justifiable.
>
> Where it got me is interfacing with c-code that expected a 1d array,
> and I was calling it with arrays of varying length. I was using this
> to ensure the proper typing; howe
To be honest, this doesn't seem justifiable.
Where it got me is interfacing with c-code that expected a 1d array,
and I was calling it with arrays of varying length. I was using this
to ensure the proper typing; however, when the array was length 1, the
program crashed...
Should I file a bug rep
2008/5/1 Travis E. Oliphant <[EMAIL PROTECTED]>:
> Stéfan van der Walt wrote:
>
>
> > 2008/5/1 Travis E. Oliphant <[EMAIL PROTECTED]>:
> >
> >> > OK, I see your point. I'm working on a patch that does the following:
> >> >
> >> > def view(type_or_dtype=None, dtype=None, type=None):
> >> >
Stéfan van der Walt wrote:
> 2008/5/1 Travis E. Oliphant <[EMAIL PROTECTED]>:
>
>> > OK, I see your point. I'm working on a patch that does the following:
>> >
>> > def view(type_or_dtype=None, dtype=None, type=None):
>> > if type_or_dtype:
>> > if dtype:
>> > ra
On Thu, 01 May 2008, Christopher Barker apparently wrote:
> Maybe we should have a Wiki page for "stuff we'd like to change, but
> won't until major API breakage is otherwise occurring"
Perhaps http://www.scipy.org/ProposedEnhancements>
would suffice?
Cheers,
Alan
_
> Please review http://projects.scipy.org/scipy/numpy/changeset/5117.
>
Stefan,
I don't think we really need the dtype_or_type keyword.It seems that
we could just check the first argument (dtype) to see if it is a subtype
of the ndarray and assume that it is type= in that case.
-Travi
On Wed, Apr 30, 2008 at 3:09 PM, Gael Varoquaux
<[EMAIL PROTECTED]> wrote:
> On Wed, Apr 30, 2008 at 11:57:44AM -0700, Christopher Barker wrote:
> > I think I still like the idea of an iterator (or maybe making rollaxis a
> > method?), but this works pretty well.
>
> Generally, in object oriente
2008/5/1 Travis E. Oliphant <[EMAIL PROTECTED]>:
> > OK, I see your point. I'm working on a patch that does the following:
> >
> > def view(type_or_dtype=None, dtype=None, type=None):
> > if type_or_dtype:
> > if dtype:
> > raise ValueError("Cannot specify dtype twi
Travis E. Oliphant wrote:
>> def view(type_or_dtype=None, dtype=None, type=None):
> Yes, I think that would work.
Is there a way to deprecate this for future API-incompatible versions?
It's better than non keywords, but a bit ugly.
Maybe we should have a Wiki page for "stuff we'd like to chang
Stéfan van der Walt wrote:
> 2008/5/1 Travis E. Oliphant <[EMAIL PROTECTED]>:
>
>> Stéfan van der Walt wrote:
>> > 2008/4/30 Christopher Barker <[EMAIL PROTECTED]>:
>> >
>> >> Stéfan van der Walt wrote:
>> >> > That's the way, or just rgba_image.view(numpy.int32).
>> >>
>> >> ah -- inter
2008/5/1 Travis E. Oliphant <[EMAIL PROTECTED]>:
> Stéfan van der Walt wrote:
> > 2008/4/30 Christopher Barker <[EMAIL PROTECTED]>:
> >
> >> Stéfan van der Walt wrote:
> >> > That's the way, or just rgba_image.view(numpy.int32).
> >>
> >> ah -- interestingly, I tried:
> >>
> >> rgba_imag
15 matches
Mail list logo