scipy/scipy — pull request #4156 by larsmans (2014-11-17 12:29:26+00:00)
Title: MAINT: optimize: remove dead code

`ndim` ("rank") of arrays that were previously flattened were being checked. The `ndim` of these is always one:

```python
>>> array(1).flatten()
array([1])
>>> type(array([1])[0])

>>> array([1])[0].flatten()
array([1])
```

(The check and flatten could be swapped, but that would change current behavior.)