#ifndef PYTHONIC_INCLUDE_NUMPY_WHERE_HPP #define PYTHONIC_INCLUDE_NUMPY_WHERE_HPP #include "pythonic/include/numpy/asarray.hpp" #include "pythonic/include/numpy/nonzero.hpp" #include "pythonic/include/numpy/copy.hpp" PYTHONIC_NS_BEGIN namespace numpy { namespace impl { template typename __combined::type where(E const &cond, F const &true_, G const &false_); } #define NUMPY_NARY_EXTRA_METHOD \ template \ auto operator()(E && expr)->decltype(nonzero{}(std::forward(expr))) \ { \ return nonzero{}(std::forward(expr)); \ } #define NUMPY_NARY_FUNC_NAME where #define NUMPY_NARY_FUNC_SYM impl::where #define NUMPY_NARY_RESHAPE_MODE reshape_type #include "pythonic/include/types/numpy_nary_expr.hpp" } PYTHONIC_NS_END #endif