#ifndef PYTHONIC_INCLUDE_UTILS_NUMPY_TRAITS_HPP #define PYTHONIC_INCLUDE_UTILS_NUMPY_TRAITS_HPP #include "pythonic/include/types/traits.hpp" PYTHONIC_NS_BEGIN namespace types { template struct ndarray; template struct numpy_iexpr; template struct numpy_vexpr; template struct numpy_gexpr; template struct numpy_texpr; template struct numpy_texpr_2; template struct numpy_expr; template class list; template class sliced_list; struct empty_list; template struct array_base; template struct dynamic_tuple; template struct broadcasted; template struct broadcast; template struct is_ndarray { static constexpr bool value = false; }; template struct is_ndarray> { static constexpr bool value = true; }; /* Type trait that checks if a type is a potential numpy expression *parameter * * Only used to write concise expression templates */ template struct is_array { static constexpr bool value = false; }; template struct is_array> { static constexpr bool value = true; }; template struct is_array> { static constexpr bool value = true; }; template struct is_array> { static constexpr bool value = true; }; template struct is_array> { static constexpr bool value = true; }; template struct is_array> { static constexpr bool value = true; }; template struct is_array> { static constexpr bool value = true; }; template struct is_array> { static constexpr bool value = true; }; template struct is_numexpr_arg : is_array { }; template struct is_numexpr_arg : is_numexpr_arg { }; template struct is_numexpr_arg : is_numexpr_arg { }; template struct is_numexpr_arg : is_numexpr_arg { }; template struct is_numexpr_arg : is_numexpr_arg { }; template struct is_numexpr_arg> { static constexpr bool value = is_numexpr_arg::value || is_dtype::value; }; template struct is_numexpr_arg> { static constexpr bool value = is_numexpr_arg::value || is_dtype::value; }; template <> struct is_numexpr_arg { static constexpr bool value = true; }; template struct is_numexpr_arg> { static constexpr bool value = is_numexpr_arg::value || is_dtype::value; }; template struct is_numexpr_arg> { static constexpr bool value = is_numexpr_arg::value || is_dtype::value; }; template struct is_numexpr_arg> { static constexpr bool value = is_numexpr_arg::value || is_dtype::value; }; template struct is_numexpr_arg> { static constexpr bool value = is_numexpr_arg::value || is_dtype::value; }; template struct dtype_of { template static typename T::dtype get(typename T::dtype *); template static T get(...); using type = decltype(get(nullptr)); }; } PYTHONIC_NS_END #endif