numpy/numpy — pull request #2891 by seberg (2013-01-07 00:32:26+00:00)
Title: Deprecate non integer function arguments

There are two very different things here and I guess I will pull out the second commit.

The first commit basically makes sure that floating point numbers are rejected as function arguments inside the C-Api, this probably has some other side effects (ie. it spills into indexing which makes the deprecation test fail). This change is done by using the index machinery. Since arrays support that, I don't see much of a point to have a lot of code to handle them specifically.

The second thing is related in so far that it deprecates doing things like:
```
np.array([1,2,3]).reshape(np.array([3]), -1)
```
so using arrays that are not 0-d for these arguments. However this is done by deprecating the index machinery for those arrays. I think its too weird to allow `__index__` to work on them, and it is either deprecating that usage, or just allowing such arguments.

I decided to also reject bools, because for example in indexing I think they are special enough to not really be integers. This is however not quite in line with python which allows `list[True] == list[1]`. (I did not check how numpy bools behave in all of these cases).

--

At this point it is a work in progress, since at least that indexing issue needs to be resolved and (deprecatioin) tests need to be added.