Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions include/xtensor-python/pybuffer_adaptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ namespace xt
const_reverse_iterator crbegin() const;
const_reverse_iterator crend() const;

pointer data();
const_pointer data() const;

private:

pointer p_data;
Expand Down Expand Up @@ -258,6 +261,18 @@ namespace xt
{
return rend();
}

template <class T>
inline auto pybuffer_adaptor<T>::data() -> pointer
{
return p_data;
}

template <class T>
inline auto pybuffer_adaptor<T>::data() const -> const_pointer
{
return p_data;
}

template<class T>
inline bool operator==(const pybuffer_adaptor<T>& x, const pybuffer_adaptor<T>& y)
Expand Down