desihub / speclite

Lightweight utilities for working with spectroscopic data
14 stars 19 forks source link

slice with tuples not arrays #52

Closed sbailey closed 5 years ago

sbailey commented 5 years ago

Recent versions of numpy generate a FutureWarning on speclite tests:

[...]/speclite/filters.py:1520: FutureWarning:
Using a non-tuple sequence for multidimensional indexing is deprecated;
use `arr[tuple(seq)]` instead of `arr[seq]`.
In the future this will be interpreted as an array index, `arr[np.array(seq)]`,
which will result either in an error or a different result.
    integrand = integrand[values_slice]

This PR follows that advice to use arr[tuple(seq)] in two places.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.8%) to 99.896% when pulling c3de39b0e0ac455438d7ffb2655b85f48062f983 on sbailey:tuple-index into 23c066adf6650340700863279dc532d4a22438c5 on dkirkby:master.