#ifndef PYTHONIC_NUMPY_NDARRAY_FLATTEN_HPP #define PYTHONIC_NUMPY_NDARRAY_FLATTEN_HPP #include "pythonic/include/numpy/ndarray/flatten.hpp" #include "pythonic/utils/functor.hpp" #include "pythonic/types/ndarray.hpp" PYTHONIC_NS_BEGIN namespace numpy { namespace ndarray { template types::ndarray> flatten(types::ndarray const &a) { return {a.mem, types::pshape{a.flat_size()}}; } NUMPY_EXPR_TO_NDARRAY0_IMPL(flatten); } } PYTHONIC_NS_END #endif