[Numpy-discussion] Bug in arange dtype ">f" was: Using arr.dtype.type to check byteorder-independed dtype fails for bool
Stefan van der Walt
stefan at sun.ac.za
Sat Nov 17 19:04:58 EST 2007
On Tue, Nov 13, 2007 at 02:53:32PM +0100, Sebastian Haase wrote:
> On Nov 13, 2007 2:18 PM, Stefan van der Walt <stefan at sun.ac.za> 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 should now be fixed in SVN r4465.
Regards
Stéfan
More information about the NumPy-Discussion
mailing list