On Nov 13, 2007 2:18 PM, Stefan van der Walt <[EMAIL PROTECTED]> wrote:
> Hi Sebastian
>
> On Tue, Nov 13, 2007 at 01:11:33PM +0100, Sebastian Haase wrote:
> > Hi,
> > I need to check the array dtype in a way that it is ignoring
> > differences coming only from big-endian vs. little-endian.
>
> Does
>
> N.issubdtype(first_dtype, second_dtype)
>
> work?
Hi  Stéfan,

trying to anwer your question with a quick "arange" test, I ran into
more confusion:
>> a = N.arange(.5, dtype=">f")
>>> `a.dtype`
'dtype('float32')'
>>> a = N.arange(.5, dtype="<f")
>>> `a.dtype`
'dtype('float32')'

Both equal positively with N.float32 now !
>>> N.__version__
'1.0.1'

This is (was?) apparently a bug in arange

It works as expected with empty():
>>> N.empty(5, dtype=">f").dtype==N.float32
False
>>> N.empty(5, dtype="<f").dtype==N.float32
True


Cheers,
Sebastian
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to