kwgoodman/la — Issue #38: indexing bug
Author: kwgoodman
Created: 2012-01-28 00:23:36+00:00
State: open

As reported by Thomas Coffee on the labeled-array mailing list there is an indexing bug when dtype is object:

y = la.larry([None])
y[0]
ValueError: 0d larrys are not supported

Replacing the last if statement in __getitem__ with the following seems to fix it:

if not type(x) == np.ndarray:
return x

It also makes __getitem__ a tiny bit faster.