Skip to content

Commit

Permalink
TA-python: fix range slice
Browse files Browse the repository at this point in the history
  • Loading branch information
asadchev committed Jan 29, 2025
1 parent d913d91 commit 00f659a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/src/TiledArray/python/range.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ namespace range {
return r.upbound();
}

inline py::list slice(const Range &r) {
inline auto slice(const Range &r) {
py::list s;
for (size_t i = 0; i < ndim(r); ++i) {
s.append(
py::slice(start(r)[i], stop(r)[i], 1)
);
}
return s;
return py::tuple(s);
}

inline py::str str(const Range &r) {
Expand Down

0 comments on commit 00f659a

Please sign in to comment.