summaryrefslogtreecommitdiffstats
path: root/contrib/python/pythran/pythran/pythonic/numpy/isrealobj.hpp
diff options
context:
space:
mode:
authormaxim-yurchuk <[email protected]>2024-10-09 12:29:46 +0300
committermaxim-yurchuk <[email protected]>2024-10-09 13:14:22 +0300
commit9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch)
treea8fb3181d5947c0d78cf402aa56e686130179049 /contrib/python/pythran/pythran/pythonic/numpy/isrealobj.hpp
parenta44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff)
publishFullContrib: true for ydb
<HIDDEN_URL> commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/python/pythran/pythran/pythonic/numpy/isrealobj.hpp')
-rw-r--r--contrib/python/pythran/pythran/pythonic/numpy/isrealobj.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/python/pythran/pythran/pythonic/numpy/isrealobj.hpp b/contrib/python/pythran/pythran/pythonic/numpy/isrealobj.hpp
new file mode 100644
index 00000000000..f8207f9a98b
--- /dev/null
+++ b/contrib/python/pythran/pythran/pythonic/numpy/isrealobj.hpp
@@ -0,0 +1,22 @@
+#ifndef PYTHONIC_NUMPY_ISREALOBJ_HPP
+#define PYTHONIC_NUMPY_ISREALOBJ_HPP
+
+#include "pythonic/include/numpy/isrealobj.hpp"
+
+#include "pythonic/utils/functor.hpp"
+#include "pythonic/types/ndarray.hpp"
+#include "pythonic/types/traits.hpp"
+
+PYTHONIC_NS_BEGIN
+
+namespace numpy
+{
+ template <class E>
+ constexpr bool isrealobj(E const &expr)
+ {
+ return !types::is_complex<typename E::dtype>::value;
+ }
+}
+PYTHONIC_NS_END
+
+#endif