#ifndef PYTHONIC_NUMPY_ONES_HPP #define PYTHONIC_NUMPY_ONES_HPP #include "pythonic/include/numpy/ones.hpp" #include "pythonic/utils/functor.hpp" #include "pythonic/types/ndarray.hpp" PYTHONIC_NS_BEGIN namespace numpy { template types::ndarray> ones(pS const &shape, dtype d) { return {(sutils::shape_t)shape, typename dtype::type(1)}; } template types::ndarray> ones(long size, dtype d) { return ones(types::pshape(size), d); } template types::ndarray>> ones(std::integral_constant, dtype d) { return ones(types::pshape>({}), d); } } PYTHONIC_NS_END #endif