class documentation
class TestMultiIndexingAutomated: (source)
These tests use code to mimic the C-Code indexing for selection.
NOTE:
- This still lacks tests for complex item setting.
- If you change behavior of indexing, you might want to modify these tests to try more combinations.
- Behavior was written to match numpy version 1.8. (though a first version matched 1.7.)
- Only tuple indices are supported by the mimicking code. (and tested as of writing this)
- Error types should match most of the time as long as there is only one error. For multiple errors, what gets raised will usually not be the same one. They are not tested.
Update 2016-11-30: It is probably not worth maintaining this test indefinitely and it can be dropped if maintenance becomes a burden.
Method | setup |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Instance Variable | a |
Undocumented |
Instance Variable | b |
Undocumented |
Instance Variable | complex |
Undocumented |
Instance Variable | fill |
Undocumented |
Instance Variable | simple |
Undocumented |
Method | _check |
Check a multi index item getting and simple setting. |
Method | _check |
Check a single index item getting and simple setting. |
Method | _compare |
Compare mimicked result to indexing result. |
Method | _get |
Mimic multi dimensional indexing. |
Check a multi index item getting and simple setting.
Parameters | |
arr:ndarray | Array to be indexed, must be a reshaped arange. |
index:tuple of indexing objects | Index being tested. |
Check a single index item getting and simple setting.
Parameters | |
arr:ndarray | Array to be indexed, must be an arange. |
index:indexing object | Index being tested. Must be a single index and not a tuple
of indexing objects (see also _check_multi_index ). |
Mimic multi dimensional indexing.
Notes
While the function may mostly match the errors of normal indexing this is generally not the case.
Parameters | |
arr:ndarray | Array to be indexed. |
indices:tuple of index objects | |
Returns | |
|