[Numpy-discussion] Updated differences between 1.5.1 to 1.6.1

Mark Wiebe mwwiebe@gmail....
Tue Feb 14 12:50:42 CST 2012


On Tue, Feb 14, 2012 at 1:03 AM, Travis Oliphant <travis@continuum.io>wrote:

> <snip>
>        Mostly I'm happy with the changes (after a cursory review).  As I
> expected, there are some real improvements.    Of course, I haven't looked
> at the changes that occur when the scalar being used does not fit in the
> range of the array data-type.   I don't see this change documented in the
> link that Mark sent previously.   Is it somewhere else?


That part is handled by the min_scalar_type function, linked in the
description. An aspect of the previous mechanism I didn't like is that the
existing analogous promotion of unsigned -> signed was tucked away deep in
the C code, and that motivated this exposure of the components of the type
promotion system as function calls.

http://docs.scipy.org/doc/numpy/reference/generated/numpy.min_scalar_type.html


>   Also, it looks like previously object arrays were returned for some
> coercions which now simply fail.  Is that an expected result?
>

I believe what you're seeing here is the result of a performance
optimization (note: done carefully, I might point out that there were many
performance optimizations I did not do because they would have broken
backwards compatibility). This was a pretty large performance issue, I
believe in the comparison operators. The operation on non-object dtypes
would promote to object dtypes and hence run very slowly. After this, the
code which called it would determine that it was the wrong result, throw
away the computation, and return something else.

Cheers,
Mark

At this point, I'm not going to recommend changes to 1.7 to deal with these
> type-casting changes --- at least this thread will serve to show some of
> what changes occurred if it bites anyone in the future.
>
> However, I will have other changes to NumPy 1.X that I will be proposing
> and writing (and directing other people to write as well).  After some
> period of quiet, this might be a refreshing change.  But, not all may see
> it that way.   I'm confident that we can resolve any concerns people might
> have.   Any feature additions will preserve backward compatibility in NumPy
> 1.X.   Mark W. will be helping with some of these changes, but mostly he
> will be working on NumPy 2.0 which we have tentatively targeted for next
> January.    We have a tentative target for NumPy 1.8 in June/July.    So
> far, there are three developers who will be working on NumPy 1.8 (me,
> Francesc Alted, and Bryan Van de Ven).  Mark Wiebe is slated to help us, as
> well, but I would like to sponsor him as much as possible on the work for
> NumPy 2.0.    If anyone else would like to join us, please let me know
> off-list.     There is room for another talented person on our team.
>
> In addition to a few select features in NumPy 1.8 (a list of which will
> follow in a later email),  we will also be working on reviewing the list of
> bugs on Trac and fixing them, writing tests, and improving docstrings.    I
> would also like to improve the state of the bug-tracker and get in place a
> continuous integration system for NumPy.   We will be advertising our NumPy
> 1.8 roadmap and our NumPy 2.0 roadmap at PyCon, and are working on
> documents that describe plans which we are hoping will be reviewed and
> discussed on this list.
>
> I know that having more people working on the code-base for several months
> will be a different scenario than what has transpired in the past.
> Hopefully, this will be a productive time for everybody and our sometimes
> different perspectives will be able to coalesce into a better result for
> more people.
>
> Best regards,
>
> -Travis
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120214/44f321f2/attachment.html 


More information about the NumPy-Discussion mailing list