| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/pythran/pythonic/numpy/ctypeslib/ |
Upload File : |
#ifndef PYTHONIC_NUMPY_CTYPESLIB_AS_ARRAY_HPP
#define PYTHONIC_NUMPY_CTYPESLIB_AS_ARRAY_HPP
#include "pythonic/include/numpy/ctypeslib/as_array.hpp"
#include "pythonic/types/ndarray.hpp"
#include "pythonic/types/pointer.hpp"
PYTHONIC_NS_BEGIN
namespace numpy
{
namespace ctypeslib
{
template <class T, class pS>
typename std::enable_if<!std::is_integral<pS>::value,
types::ndarray<T, pS>>::type
as_array(types::pointer<T> ptr, pS shape)
{
return {ptr.data, shape, types::ownership::external};
}
template <class T>
types::ndarray<T, types::pshape<long>> as_array(types::pointer<T> ptr,
long size)
{
return as_array(ptr, types::pshape<long>{size});
}
}
}
PYTHONIC_NS_END
#endif