Scalar result for field access -- Fix in minor release?

Dec. 19, 2013
9:26 a.m.
Hey, fixing a corner case indexing regression in 1.8, I noticed/fixed accidentally this behavior of returning a scalar when indexing a 0-d array with fields (see also [1]): arr = np.array((1,), dtype=[('a', 'f8')]) arr['a'] # Returns an array arr[['a']] # Currently returns a *scalar* I think no field access should try to convert 0-d arrays to scalars, and it was probably just an oversight. However, if anyone thinks there is even the slightest chance that this creates bugs in production code, we certainly should not change it in a bug-fix only release. Or am I missing something and the old behavior was actually intended? - Sebastian [1] https://github.com/numpy/numpy/issues/4109
4164
Age (days ago)
4164
Last active (days ago)
0 comments
1 participants
participants (1)
-
Sebastian Berg