[Numpy-discussion] NumPy 1.0 release-candidate 1.0 this weekend

Charles R Harris charlesr.harris at gmail.com
Thu Sep 14 11:24:51 CDT 2006


On 9/14/06, Victoria G. Laidler <laidler at stsci.edu> wrote:
>
> Francesc Altet wrote:
>
> >El dj 14 de 09 del 2006 a les 02:11 -0700, en/na Andrew Straw va
> >escriure:
> >
> >
> >>>>My main focus is on the fact that you might read '<i4' as
> >>>>"less" than 4-bytes int, which is very confusing !
> >>>>
> >>>>
> >>>>
> >>>>
> >>>I can agree it's confusing at first, but it's the same syntax the
> struct
> >>>module uses which is the Python precedent for this.
> >>>
> >>>
> >>>
> >>I'm happy with seeing the repr() value since I know what it means, but I
> >>can see Sebastian's point. Perhaps there's a middle ground -- the str()
> >>representation for simple dtypes could contain both the repr() value and
> >>an English description. For example, something along the lines of
> >>"dtype('<i4') (4 byte integer, little endian)". For more complex dtypes,
> >>the repr() string could be given without any kind of English
> translation.
> >>
> >>
> >
> >+1
> >
> >I was very used (and happy) to the numarray string representation for
> >types ('Int32', 'Complex64'...) and looking at how NumPy represents it
> >now, I'd say that this is a backwards step in readability. Something
> >like '<i4' would look good for a low-level library, but not for a
> >high-level one like NumPy, IMO.
> >
> >
> I agree entirely.
> The first type I got '<i4' instead of 'Int32', my reaction was "What the
> hell is that?"
> It looked disturbingly like line-noise corrupted text to me! (Blast from
> the past...)
>
> +1 from me as well.


Just to balance the voting, I think things are fine as they are. As Travis
says, the '<' is already used in the Python structure module and the rest
doesn't take much time getting used to. However, the docstring for the dtype
class is a bit lacking. It shouldn't be too much work to fix that up.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060914/6ff00724/attachment-0001.html 


More information about the Numpy-discussion mailing list