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
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
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
Travis E. Oliphant wrote:
> Stéfan van der Walt wrote:
>> 2008/4/30 Christopher Barker <[EMAIL PROTECTED]>:
>>> Since it is optional, shouldn't it be keyword argument?
>>>
>> Thanks, fixed in r5115.
>>
>>
> This was too hasty. I had considered this before.
>
> The problem with this is t
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_image.view(dtype=numpy.int32)
>>
>> and got:
>>
>> Traceback (most recent
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_image.view(dtype=numpy.int32)
>
> and got:
>
> Traceback (most recent call last):
>File "", line 1, in
> Typ
Stéfan van der Walt wrote:
> That's the way, or just rgba_image.view(numpy.int32).
ah -- interestingly, I tried:
rgba_image.view(dtype=numpy.int32)
and got:
Traceback (most recent call last):
File "", line 1, in
TypeError: view() takes no keyword arguments
Since it is optional, shouldn't i
Hi Chris
2008/4/30 Christopher Barker <[EMAIL PROTECTED]>:
> Someone on the wxPython list posted a nifty recarray example that I
> don't quite understand. The idea is to have an array for an RGBA image:
>
> rgbarec = numpy.dtype({'r':(numpy.uint8,0),
> 'g':(numpy.uint8,1
Christopher Barker wrote:
> Hi folks,
>
> Someone on the wxPython list posted a nifty recarray example that I
> don't quite understand. The idea is to have an array for an RGBA image:
>
> rgbarec = numpy.dtype({'r':(numpy.uint8,0),
> 'g':(numpy.uint8,1),
>
Hi folks,
Someone on the wxPython list posted a nifty recarray example that I
don't quite understand. The idea is to have an array for an RGBA image:
rgbarec = numpy.dtype({'r':(numpy.uint8,0),
'g':(numpy.uint8,1),
'b':(numpy.uint8,2),
16 matches
Mail list logo