| Server IP : 217.160.0.212 / Your IP : 216.73.216.60 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/pythran/pythonic/include/numpy/ndarray/ |
Upload File : |
#ifndef PYTHONIC_INCLUDE_NUMPY_NDARRAY_RESHAPE_HPP
#define PYTHONIC_INCLUDE_NUMPY_NDARRAY_RESHAPE_HPP
#include "pythonic/include/utils/functor.hpp"
#include "pythonic/include/utils/numpy_conversion.hpp"
#include "pythonic/include/types/ndarray.hpp"
PYTHONIC_NS_BEGIN
namespace numpy
{
namespace ndarray
{
template <class T, class pS, class NpS>
typename std::enable_if<!std::is_integral<NpS>::value,
types::ndarray<T, NpS>>::type
reshape(types::ndarray<T, pS> const &expr, NpS const &new_shape);
template <class T, class pS, class NpS>
typename std::enable_if<std::is_integral<NpS>::value,
types::ndarray<T, types::pshape<long>>>::type
reshape(types::ndarray<T, pS> const &expr, NpS const &new_shape);
template <class T, class pS, class S0, class S1, class... S>
auto reshape(types::ndarray<T, pS> const &expr, S0 i0, S1 i1,
S const &... indices)
-> decltype(reshape(expr,
types::pshape<S0, S1, S...>{i0, i1, indices...}));
NUMPY_EXPR_TO_NDARRAY0_DECL(reshape);
DEFINE_FUNCTOR(pythonic::numpy::ndarray, reshape);
}
}
PYTHONIC_NS_END
#endif