[Numpy-discussion] NumPy 1.11.0b3 released.

Sebastian Berg sebastian at sipsolutions.net
Tue Feb 16 07:05:31 EST 2016


On Di, 2016-02-16 at 00:13 -0500, josef.pktd at gmail.com wrote:
> 
> 
> On Tue, Feb 16, 2016 at 12:09 AM, <josef.pktd at gmail.com> wrote:
> > 
> > 
<skip>
> > 
> > 
> > Or, it forces everyone to watch out for the color of the ducks :)
> > 
> > It's just a number, whether it's python scalar, numpy scalar, 1D or
> > 2D.
> > And once we squeeze, we cannot iterate over it anymore. 
> > 
> > 
> > This looks like the last problem with have in statsmodels master.
> > Part of the reason that 0.10 hurt quite a bit is that we are using
> > in statsmodels some of the grey zones so we don't have to commit to
> > a specific usage. Even if a user or developer tries a "weird" case,
> > it works for most of the results, but breaks in some unknown
> > places. 
> > 
> > 
> I meant 1.11 here.
>  

The reason for this part is that `arr[np.array([1])]` is very different
from `arr[np.array(1)]`. For `list[np.array([1])]` if you allow
`operator.index(np.array([1]))` you will not get equivalent results for
lists and arrays.

The normal array result cannot work for lists. We had open bug reports
about it. Of course I dislike it in any case ;), but that is the
reasoning behind being a bit more restrictive for `__index__`.

- Sebastian


> > (In the current case a cryptic exception would be raised if the
> > user has two constant columns in the regression. Which is fine for
> > some usecases but not for every result.)
> > 
> > Josef
> >  
> > > 
> > > Chuck
> > > 
> > > _______________________________________________
> > > NumPy-Discussion mailing list
> > > NumPy-Discussion at scipy.org
> > > https://mail.scipy.org/mailman/listinfo/numpy-discussion
> > > 
> > 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20160216/10655043/attachment.sig>


More information about the NumPy-Discussion mailing list