#ifndef PYTHONIC_INCLUDE_NUMPY_NDARRAY_ITEM_HPP #define PYTHONIC_INCLUDE_NUMPY_NDARRAY_ITEM_HPP #include "pythonic/utils/functor.hpp" #include "pythonic/types/ndarray.hpp" PYTHONIC_NS_BEGIN namespace numpy { namespace ndarray { template T item(types::ndarray const &expr, long i); template auto item(E &&expr, types::array const &i) -> decltype(expr[i]); // only for compatibility purpose, very bad impl template typename std::decay::type::dtype item(E &&expr, long i); DEFINE_FUNCTOR(pythonic::numpy::ndarray, item); } } PYTHONIC_NS_END #endif