Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5844 improve metatensor slicing (#5845)
Signed-off-by: Wenqi Li <wenqil@nvidia.com> Fixes #5844 - improves the error message when slicing data with inconsistent metadata - fixes an indexing case: ``` x = MetaTensor(np.zeros((10, 3, 4))) x[slice(1, 0)] # should return zero length data ``` ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com>
- Loading branch information