numpy/numpy — pull request #3757 by dimasad (2013-09-17 03:01:06+00:00)
Title: BUG: fix #3017 Inconsistency in indexing 0-d arrays with Ellipsis.

As mentioned in Issue #3017, there were inconsistencies in the indexing and assignment of 0-d arrays:

>>> import numpy as np
>>> a = np.array(1)
>>> a[...] = 2
>>> a[...,]
array(2)
>>> a[...,] = 3
Traceback (most recent call last):
File "", line 1, in
IndexError: 0-d arrays can't be indexed.

The code which checked for special cases omitted this case (of `a[...,]`) so I included it as equivalent to `a[...]`.

Tested in python 2.7.3 and 3.2.3.