machinalis / mypy-data

mypy typesheds for the Python data stack
BSD 3-Clause "New" or "Revised" License
86 stars 23 forks source link

Stricter types for ndarray __getitem__ and __setitem__ #11

Open dmoisset opened 8 years ago

dmoisset commented 8 years ago

Currently they accept anything. Being stricter needs some care because both accept setting and converting scalars, arrays, or python values, and they also can accept python objects, arrays, slices, etc as keys.

dmoisset commented 8 years ago

Documentation at http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html#arrays-indexing