#1 Update to 0.9.4post1 (#1747029)
Merged 4 years ago by churchyard. Opened 4 years ago by churchyard.
rpms/ churchyard/pythran 0.9.4post1  into  master

@@ -0,0 +1,48 @@ 

+ From 2be7a91f3d2cf9a863afeb6aae5ca20c0ca2e2c3 Mon Sep 17 00:00:00 2001

+ From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>

+ Date: Tue, 10 Dec 2019 09:48:46 +0100

+ Subject: [PATCH] Fix implicit conversion for unary operator+

+ 

+ ---

+  pythran/pythonic/include/operator_/pos.hpp |  4 ++++

+  pythran/pythonic/operator_/pos.hpp         | 12 ++++++++++++

+  2 files changed, 16 insertions(+)

+ 

+ diff --git a/pythran/pythonic/include/operator_/pos.hpp b/pythran/pythonic/include/operator_/pos.hpp

+ index d2e83cfa0..0cb1dad81 100644

+ --- a/pythran/pythonic/include/operator_/pos.hpp

+ +++ b/pythran/pythonic/include/operator_/pos.hpp

+ @@ -11,6 +11,10 @@ namespace operator_

+    template <class A>

+    auto pos(A const &a) -> decltype(+a);

+  

+ +  char pos(char const& a);

+ +  signed char pos(signed char const& a);

+ +  unsigned char pos(unsigned char const& a);

+ +

+    DEFINE_FUNCTOR(pythonic::operator_, pos);

+  }

+  PYTHONIC_NS_END

+ diff --git a/pythran/pythonic/operator_/pos.hpp b/pythran/pythonic/operator_/pos.hpp

+ index 5428ecbd8..53933074c 100644

+ --- a/pythran/pythonic/operator_/pos.hpp

+ +++ b/pythran/pythonic/operator_/pos.hpp

+ @@ -15,6 +15,18 @@ namespace operator_

+    {

+      return +a;

+    }

+ +

+ +  char pos(char const& a) {

+ +    return +a;

+ +  }

+ +

+ +  signed char pos(signed char const& a) {

+ +    return +a;

+ +  }

+ +

+ +  unsigned char pos(unsigned char const& a) {

+ +    return +a;

+ +  }

+  }

+  PYTHONIC_NS_END

+  

@@ -0,0 +1,864 @@ 

+ From b0501d3d6e11d00c8c839adcc2694820ecfa519e Mon Sep 17 00:00:00 2001

+ From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>

+ Date: Sun, 8 Dec 2019 21:36:38 +0100

+ Subject: [PATCH] Support more numpy type conversion operators

+ 

+ ---

+  pythran/pythonic/__builtin__/type.hpp        | 58 ++++++++++++--------

+  pythran/pythonic/include/numpy/byte.hpp      | 29 ++++++++++

+  pythran/pythonic/include/numpy/int_.hpp      | 28 ++++++++++

+  pythran/pythonic/include/numpy/longlong.hpp  | 29 ++++++++++

+  pythran/pythonic/include/numpy/short_.hpp    | 29 ++++++++++

+  pythran/pythonic/include/numpy/ubyte.hpp     | 20 ++++++-

+  pythran/pythonic/include/numpy/uint.hpp      | 28 ++++++++++

+  pythran/pythonic/include/numpy/ulonglong.hpp | 29 ++++++++++

+  pythran/pythonic/include/numpy/ushort.hpp    | 29 ++++++++++

+  pythran/pythonic/include/types/int.hpp       |  1 +

+  pythran/pythonic/numpy/byte.hpp              | 37 +++++++++++++

+  pythran/pythonic/numpy/int_.hpp              | 37 +++++++++++++

+  pythran/pythonic/numpy/longlong.hpp          | 37 +++++++++++++

+  pythran/pythonic/numpy/short_.hpp            | 37 +++++++++++++

+  pythran/pythonic/numpy/ubyte.hpp             | 32 ++++++++++-

+  pythran/pythonic/numpy/uint.hpp              | 37 +++++++++++++

+  pythran/pythonic/numpy/ulonglong.hpp         | 37 +++++++++++++

+  pythran/pythonic/numpy/ushort.hpp            | 37 +++++++++++++

+  pythran/pythonic/types/int.hpp               |  5 ++

+  pythran/tables.py                            |  6 ++

+  pythran/tests/test_ndarray.py                | 15 +++++

+  21 files changed, 570 insertions(+), 27 deletions(-)

+  create mode 100644 pythran/pythonic/include/numpy/byte.hpp

+  create mode 100644 pythran/pythonic/include/numpy/int_.hpp

+  create mode 100644 pythran/pythonic/include/numpy/longlong.hpp

+  create mode 100644 pythran/pythonic/include/numpy/short_.hpp

+  create mode 100644 pythran/pythonic/include/numpy/uint.hpp

+  create mode 100644 pythran/pythonic/include/numpy/ulonglong.hpp

+  create mode 100644 pythran/pythonic/include/numpy/ushort.hpp

+  create mode 100644 pythran/pythonic/numpy/byte.hpp

+  create mode 100644 pythran/pythonic/numpy/int_.hpp

+  create mode 100644 pythran/pythonic/numpy/longlong.hpp

+  create mode 100644 pythran/pythonic/numpy/short_.hpp

+  create mode 100644 pythran/pythonic/numpy/uint.hpp

+  create mode 100644 pythran/pythonic/numpy/ulonglong.hpp

+  create mode 100644 pythran/pythonic/numpy/ushort.hpp

+ 

+ diff --git a/pythran/pythonic/__builtin__/type.hpp b/pythran/pythonic/__builtin__/type.hpp

+ index f222597a4..04232b0f8 100644

+ --- a/pythran/pythonic/__builtin__/type.hpp

+ +++ b/pythran/pythonic/__builtin__/type.hpp

+ @@ -15,14 +15,16 @@

+  #include "pythonic/__builtin__/dict.hpp"

+  #include "pythonic/__builtin__/tuple.hpp"

+  #include "pythonic/numpy/array.hpp"

+ -#include "pythonic/numpy/int8.hpp"

+ -#include "pythonic/numpy/uint8.hpp"

+ -#include "pythonic/numpy/int16.hpp"

+ -#include "pythonic/numpy/uint16.hpp"

+ -#include "pythonic/numpy/int32.hpp"

+ -#include "pythonic/numpy/uint32.hpp"

+ -#include "pythonic/numpy/int64.hpp"

+ -#include "pythonic/numpy/uint64.hpp"

+ +#include "pythonic/numpy/byte.hpp"

+ +#include "pythonic/numpy/ubyte.hpp"

+ +#include "pythonic/numpy/short_.hpp"

+ +#include "pythonic/numpy/ushort.hpp"

+ +#include "pythonic/numpy/intc.hpp"

+ +#include "pythonic/numpy/uintc.hpp"

+ +#include "pythonic/numpy/int_.hpp"

+ +#include "pythonic/numpy/uint.hpp"

+ +#include "pythonic/numpy/longlong.hpp"

+ +#include "pythonic/numpy/ulonglong.hpp"

+  #include "pythonic/numpy/float32.hpp"

+  #include "pythonic/numpy/float128.hpp"

+  

+ @@ -87,36 +89,44 @@ namespace __builtin__

+      using type = numpy::functor::array;

+    };

+    template <>

+ -  struct type_functor<int8_t> {

+ -    using type = numpy::functor::int8;

+ +  struct type_functor<signed char> {

+ +    using type = numpy::functor::byte;

+    };

+    template <>

+ -  struct type_functor<uint8_t> {

+ -    using type = numpy::functor::uint8;

+ +  struct type_functor<unsigned char> {

+ +    using type = numpy::functor::ubyte;

+    };

+    template <>

+ -  struct type_functor<int16_t> {

+ -    using type = numpy::functor::int16;

+ +  struct type_functor<short> {

+ +    using type = numpy::functor::short_;

+    };

+    template <>

+ -  struct type_functor<uint16_t> {

+ -    using type = numpy::functor::uint16;

+ +  struct type_functor<unsigned short> {

+ +    using type = numpy::functor::ushort;

+    };

+    template <>

+ -  struct type_functor<int32_t> {

+ -    using type = numpy::functor::int32;

+ +  struct type_functor<int> {

+ +    using type = numpy::functor::intc;

+    };

+    template <>

+ -  struct type_functor<uint32_t> {

+ -    using type = numpy::functor::uint32;

+ +  struct type_functor<unsigned int> {

+ +    using type = numpy::functor::uintc;

+    };

+    template <>

+ -  struct type_functor<int64_t> {

+ -    using type = numpy::functor::int64;

+ +  struct type_functor<long> {

+ +    using type = numpy::functor::int_;

+    };

+    template <>

+ -  struct type_functor<uint64_t> {

+ -    using type = numpy::functor::uint64;

+ +  struct type_functor<unsigned long> {

+ +    using type = numpy::functor::uint;

+ +  };

+ +  template <>

+ +  struct type_functor<long long> {

+ +    using type = numpy::functor::longlong;

+ +  };

+ +  template <>

+ +  struct type_functor<unsigned long long> {

+ +    using type = numpy::functor::ulonglong;

+    };

+    template <>

+    struct type_functor<float> {

+ diff --git a/pythran/pythonic/include/numpy/byte.hpp b/pythran/pythonic/include/numpy/byte.hpp

+ new file mode 100644

+ index 000000000..79f388e5a

+ --- /dev/null

+ +++ b/pythran/pythonic/include/numpy/byte.hpp

+ @@ -0,0 +1,29 @@

+ +#ifndef PYTHONIC_INCLUDE_NUMPY_BYTE_HPP

+ +#define PYTHONIC_INCLUDE_NUMPY_BYTE_HPP

+ +

+ +#include "pythonic/include/utils/functor.hpp"

+ +#include "pythonic/include/utils/meta.hpp"

+ +#include "pythonic/include/utils/numpy_traits.hpp"

+ +#include "pythonic/include/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    char byte();

+ +    template <class V>

+ +    char byte(V v);

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME byte

+ +#define NUMPY_NARY_FUNC_SYM details::byte

+ +#define NUMPY_NARY_EXTRA_METHOD using type = char;

+ +#include "pythonic/include/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/include/numpy/int_.hpp b/pythran/pythonic/include/numpy/int_.hpp

+ new file mode 100644

+ index 000000000..57df3fe4b

+ --- /dev/null

+ +++ b/pythran/pythonic/include/numpy/int_.hpp

+ @@ -0,0 +1,28 @@

+ +#ifndef PYTHONIC_INCLUDE_NUMPY_INT__HPP

+ +#define PYTHONIC_INCLUDE_NUMPY_INT__HPP

+ +

+ +#include "pythonic/include/utils/functor.hpp"

+ +#include "pythonic/include/utils/meta.hpp"

+ +#include "pythonic/include/utils/numpy_traits.hpp"

+ +#include "pythonic/include/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +    long int_();

+ +    template <class V>

+ +    long int_(V v);

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME int_

+ +#define NUMPY_NARY_FUNC_SYM details::int_

+ +#define NUMPY_NARY_EXTRA_METHOD using type = long;

+ +#include "pythonic/include/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/include/numpy/longlong.hpp b/pythran/pythonic/include/numpy/longlong.hpp

+ new file mode 100644

+ index 000000000..cde5bf455

+ --- /dev/null

+ +++ b/pythran/pythonic/include/numpy/longlong.hpp

+ @@ -0,0 +1,29 @@

+ +#ifndef PYTHONIC_INCLUDE_NUMPY_LONGLONG_HPP

+ +#define PYTHONIC_INCLUDE_NUMPY_LONGLONG_HPP

+ +

+ +#include "pythonic/include/utils/functor.hpp"

+ +#include "pythonic/include/utils/meta.hpp"

+ +#include "pythonic/include/utils/numpy_traits.hpp"

+ +#include "pythonic/include/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    long long longlong();

+ +    template <class V>

+ +    long long longlong(V v);

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME longlong

+ +#define NUMPY_NARY_FUNC_SYM details::longlong

+ +#define NUMPY_NARY_EXTRA_METHOD using type = long long;

+ +#include "pythonic/include/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/include/numpy/short_.hpp b/pythran/pythonic/include/numpy/short_.hpp

+ new file mode 100644

+ index 000000000..74e744368

+ --- /dev/null

+ +++ b/pythran/pythonic/include/numpy/short_.hpp

+ @@ -0,0 +1,29 @@

+ +#ifndef PYTHONIC_INCLUDE_NUMPY_SHORT__HPP

+ +#define PYTHONIC_INCLUDE_NUMPY_SHORT__HPP

+ +

+ +#include "pythonic/include/utils/functor.hpp"

+ +#include "pythonic/include/utils/meta.hpp"

+ +#include "pythonic/include/utils/numpy_traits.hpp"

+ +#include "pythonic/include/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    short short_();

+ +    template <class V>

+ +    short short_(V v);

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME short_

+ +#define NUMPY_NARY_FUNC_SYM details::short_

+ +#define NUMPY_NARY_EXTRA_METHOD using type = short;

+ +#include "pythonic/include/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/include/numpy/ubyte.hpp b/pythran/pythonic/include/numpy/ubyte.hpp

+ index 7cf72a3c7..51327e593 100644

+ --- a/pythran/pythonic/include/numpy/ubyte.hpp

+ +++ b/pythran/pythonic/include/numpy/ubyte.hpp

+ @@ -1,12 +1,28 @@

+  #ifndef PYTHONIC_INCLUDE_NUMPY_UBYTE_HPP

+  #define PYTHONIC_INCLUDE_NUMPY_UBYTE_HPP

+  

+ -#include "pythonic/include/numpy/uint8.hpp"

+ +#include "pythonic/include/utils/functor.hpp"

+ +#include "pythonic/include/utils/meta.hpp"

+ +#include "pythonic/include/utils/numpy_traits.hpp"

+ +#include "pythonic/include/types/numpy_op_helper.hpp"

+  

+  PYTHONIC_NS_BEGIN

+ +

+  namespace numpy

+  {

+ -  USING_FUNCTOR(ubyte, uint8);

+ +

+ +  namespace details

+ +  {

+ +

+ +    unsigned char ubyte();

+ +    template <class V>

+ +    unsigned char ubyte(V v);

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME ubyte

+ +#define NUMPY_NARY_FUNC_SYM details::ubyte

+ +#define NUMPY_NARY_EXTRA_METHOD using type = unsigned char;

+ +#include "pythonic/include/types/numpy_nary_expr.hpp"

+  }

+  PYTHONIC_NS_END

+  

+ diff --git a/pythran/pythonic/include/numpy/uint.hpp b/pythran/pythonic/include/numpy/uint.hpp

+ new file mode 100644

+ index 000000000..ec4773dae

+ --- /dev/null

+ +++ b/pythran/pythonic/include/numpy/uint.hpp

+ @@ -0,0 +1,28 @@

+ +#ifndef PYTHONIC_INCLUDE_NUMPY_UINT_HPP

+ +#define PYTHONIC_INCLUDE_NUMPY_UINT_HPP

+ +

+ +#include "pythonic/include/utils/functor.hpp"

+ +#include "pythonic/include/utils/meta.hpp"

+ +#include "pythonic/include/utils/numpy_traits.hpp"

+ +#include "pythonic/include/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +    unsigned long uint();

+ +    template <class V>

+ +    unsigned long uint(V v);

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME uint

+ +#define NUMPY_NARY_FUNC_SYM details::uint

+ +#define NUMPY_NARY_EXTRA_METHOD using type = unsigned long;

+ +#include "pythonic/include/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/include/numpy/ulonglong.hpp b/pythran/pythonic/include/numpy/ulonglong.hpp

+ new file mode 100644

+ index 000000000..8811bd2cc

+ --- /dev/null

+ +++ b/pythran/pythonic/include/numpy/ulonglong.hpp

+ @@ -0,0 +1,29 @@

+ +#ifndef PYTHONIC_INCLUDE_NUMPY_ULONGLONG_HPP

+ +#define PYTHONIC_INCLUDE_NUMPY_ULONGLONG_HPP

+ +

+ +#include "pythonic/include/utils/functor.hpp"

+ +#include "pythonic/include/utils/meta.hpp"

+ +#include "pythonic/include/utils/numpy_traits.hpp"

+ +#include "pythonic/include/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    unsigned long long ulonglong();

+ +    template <class V>

+ +    unsigned long long ulonglong(V v);

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME ulonglong

+ +#define NUMPY_NARY_FUNC_SYM details::ulonglong

+ +#define NUMPY_NARY_EXTRA_METHOD using type = unsigned long long;

+ +#include "pythonic/include/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/include/numpy/ushort.hpp b/pythran/pythonic/include/numpy/ushort.hpp

+ new file mode 100644

+ index 000000000..11d298001

+ --- /dev/null

+ +++ b/pythran/pythonic/include/numpy/ushort.hpp

+ @@ -0,0 +1,29 @@

+ +#ifndef PYTHONIC_INCLUDE_NUMPY_USHORT_HPP

+ +#define PYTHONIC_INCLUDE_NUMPY_USHORT_HPP

+ +

+ +#include "pythonic/include/utils/functor.hpp"

+ +#include "pythonic/include/utils/meta.hpp"

+ +#include "pythonic/include/utils/numpy_traits.hpp"

+ +#include "pythonic/include/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    unsigned short ushort();

+ +    template <class V>

+ +    unsigned short ushort(V v);

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME ushort

+ +#define NUMPY_NARY_FUNC_SYM details::ushort

+ +#define NUMPY_NARY_EXTRA_METHOD using type = unsigned short;

+ +#include "pythonic/include/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/include/types/int.hpp b/pythran/pythonic/include/types/int.hpp

+ index 003f9d59e..56b27bc53 100644

+ --- a/pythran/pythonic/include/types/int.hpp

+ +++ b/pythran/pythonic/include/types/int.hpp

+ @@ -26,6 +26,7 @@ PYTHONIC_NS_BEGIN

+      static PyObject *convert(TYPE l);                                          \

+    }

+  

+ +PYTHONIC_INT_TO_PYTHON(char);

+  PYTHONIC_INT_TO_PYTHON(unsigned char);

+  PYTHONIC_INT_TO_PYTHON(signed char);

+  PYTHONIC_INT_TO_PYTHON(unsigned short);

+ diff --git a/pythran/pythonic/numpy/byte.hpp b/pythran/pythonic/numpy/byte.hpp

+ new file mode 100644

+ index 000000000..423b280d2

+ --- /dev/null

+ +++ b/pythran/pythonic/numpy/byte.hpp

+ @@ -0,0 +1,37 @@

+ +#ifndef PYTHONIC_NUMPY_BYTE_HPP

+ +#define PYTHONIC_NUMPY_BYTE_HPP

+ +

+ +#include "pythonic/include/numpy/byte.hpp"

+ +

+ +#include "pythonic/utils/functor.hpp"

+ +#include "pythonic/utils/meta.hpp"

+ +#include "pythonic/utils/numpy_traits.hpp"

+ +#include "pythonic/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    char byte()

+ +    {

+ +      return {};

+ +    }

+ +

+ +    template <class V>

+ +    char byte(V v)

+ +    {

+ +      return v;

+ +    }

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME byte

+ +#define NUMPY_NARY_FUNC_SYM details::byte

+ +#include "pythonic/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/numpy/int_.hpp b/pythran/pythonic/numpy/int_.hpp

+ new file mode 100644

+ index 000000000..3854b44eb

+ --- /dev/null

+ +++ b/pythran/pythonic/numpy/int_.hpp

+ @@ -0,0 +1,37 @@

+ +#ifndef PYTHONIC_NUMPY_INT__HPP

+ +#define PYTHONIC_NUMPY_INT__HPP

+ +

+ +#include "pythonic/include/numpy/int_.hpp"

+ +

+ +#include "pythonic/utils/functor.hpp"

+ +#include "pythonic/utils/meta.hpp"

+ +#include "pythonic/utils/numpy_traits.hpp"

+ +#include "pythonic/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    long int_()

+ +    {

+ +      return {};

+ +    }

+ +

+ +    template <class V>

+ +    long int_(V v)

+ +    {

+ +      return v;

+ +    }

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME int_

+ +#define NUMPY_NARY_FUNC_SYM details::int_

+ +#include "pythonic/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/numpy/longlong.hpp b/pythran/pythonic/numpy/longlong.hpp

+ new file mode 100644

+ index 000000000..00623cba1

+ --- /dev/null

+ +++ b/pythran/pythonic/numpy/longlong.hpp

+ @@ -0,0 +1,37 @@

+ +#ifndef PYTHONIC_NUMPY_LONGLONG_HPP

+ +#define PYTHONIC_NUMPY_LONGLONG_HPP

+ +

+ +#include "pythonic/include/numpy/longlong.hpp"

+ +

+ +#include "pythonic/utils/functor.hpp"

+ +#include "pythonic/utils/meta.hpp"

+ +#include "pythonic/utils/numpy_traits.hpp"

+ +#include "pythonic/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    long long longlong()

+ +    {

+ +      return {};

+ +    }

+ +

+ +    template <class V>

+ +    long long longlong(V v)

+ +    {

+ +      return v;

+ +    }

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME longlong

+ +#define NUMPY_NARY_FUNC_SYM details::longlong

+ +#include "pythonic/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/numpy/short_.hpp b/pythran/pythonic/numpy/short_.hpp

+ new file mode 100644

+ index 000000000..0e29f34b9

+ --- /dev/null

+ +++ b/pythran/pythonic/numpy/short_.hpp

+ @@ -0,0 +1,37 @@

+ +#ifndef PYTHONIC_NUMPY_SHORT__HPP

+ +#define PYTHONIC_NUMPY_SHORT__HPP

+ +

+ +#include "pythonic/include/numpy/short_.hpp"

+ +

+ +#include "pythonic/utils/functor.hpp"

+ +#include "pythonic/utils/meta.hpp"

+ +#include "pythonic/utils/numpy_traits.hpp"

+ +#include "pythonic/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    short short_()

+ +    {

+ +      return {};

+ +    }

+ +

+ +    template <class V>

+ +    short short_(V v)

+ +    {

+ +      return v;

+ +    }

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME short_

+ +#define NUMPY_NARY_FUNC_SYM details::short_

+ +#include "pythonic/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/numpy/ubyte.hpp b/pythran/pythonic/numpy/ubyte.hpp

+ index 1838b375b..c9718aadb 100644

+ --- a/pythran/pythonic/numpy/ubyte.hpp

+ +++ b/pythran/pythonic/numpy/ubyte.hpp

+ @@ -2,6 +2,36 @@

+  #define PYTHONIC_NUMPY_UBYTE_HPP

+  

+  #include "pythonic/include/numpy/ubyte.hpp"

+ -#include "pythonic/numpy/uint8.hpp"

+ +

+ +#include "pythonic/utils/functor.hpp"

+ +#include "pythonic/utils/meta.hpp"

+ +#include "pythonic/utils/numpy_traits.hpp"

+ +#include "pythonic/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    unsigned char ubyte()

+ +    {

+ +      return {};

+ +    }

+ +

+ +    template <class V>

+ +    unsigned char ubyte(V v)

+ +    {

+ +      return v;

+ +    }

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME ubyte

+ +#define NUMPY_NARY_FUNC_SYM details::ubyte

+ +#include "pythonic/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+  

+  #endif

+ diff --git a/pythran/pythonic/numpy/uint.hpp b/pythran/pythonic/numpy/uint.hpp

+ new file mode 100644

+ index 000000000..b6592db88

+ --- /dev/null

+ +++ b/pythran/pythonic/numpy/uint.hpp

+ @@ -0,0 +1,37 @@

+ +#ifndef PYTHONIC_NUMPY_UINT_HPP

+ +#define PYTHONIC_NUMPY_UINT_HPP

+ +

+ +#include "pythonic/include/numpy/uint.hpp"

+ +

+ +#include "pythonic/utils/functor.hpp"

+ +#include "pythonic/utils/meta.hpp"

+ +#include "pythonic/utils/numpy_traits.hpp"

+ +#include "pythonic/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    unsigned long uint()

+ +    {

+ +      return {};

+ +    }

+ +

+ +    template <class V>

+ +    unsigned long uint(V v)

+ +    {

+ +      return v;

+ +    }

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME uint

+ +#define NUMPY_NARY_FUNC_SYM details::uint

+ +#include "pythonic/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/numpy/ulonglong.hpp b/pythran/pythonic/numpy/ulonglong.hpp

+ new file mode 100644

+ index 000000000..2210ac475

+ --- /dev/null

+ +++ b/pythran/pythonic/numpy/ulonglong.hpp

+ @@ -0,0 +1,37 @@

+ +#ifndef PYTHONIC_NUMPY_ULONGLONG_HPP

+ +#define PYTHONIC_NUMPY_ULONGLONG_HPP

+ +

+ +#include "pythonic/include/numpy/ulonglong.hpp"

+ +

+ +#include "pythonic/utils/functor.hpp"

+ +#include "pythonic/utils/meta.hpp"

+ +#include "pythonic/utils/numpy_traits.hpp"

+ +#include "pythonic/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    unsigned long long ulonglong()

+ +    {

+ +      return {};

+ +    }

+ +

+ +    template <class V>

+ +    unsigned long long ulonglong(V v)

+ +    {

+ +      return v;

+ +    }

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME ulonglong

+ +#define NUMPY_NARY_FUNC_SYM details::ulonglong

+ +#include "pythonic/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/numpy/ushort.hpp b/pythran/pythonic/numpy/ushort.hpp

+ new file mode 100644

+ index 000000000..0a700385c

+ --- /dev/null

+ +++ b/pythran/pythonic/numpy/ushort.hpp

+ @@ -0,0 +1,37 @@

+ +#ifndef PYTHONIC_NUMPY_USHORT_HPP

+ +#define PYTHONIC_NUMPY_USHORT_HPP

+ +

+ +#include "pythonic/include/numpy/ushort.hpp"

+ +

+ +#include "pythonic/utils/functor.hpp"

+ +#include "pythonic/utils/meta.hpp"

+ +#include "pythonic/utils/numpy_traits.hpp"

+ +#include "pythonic/types/numpy_op_helper.hpp"

+ +

+ +PYTHONIC_NS_BEGIN

+ +

+ +namespace numpy

+ +{

+ +

+ +  namespace details

+ +  {

+ +

+ +    unsigned short ushort()

+ +    {

+ +      return {};

+ +    }

+ +

+ +    template <class V>

+ +    unsigned short ushort(V v)

+ +    {

+ +      return v;

+ +    }

+ +  }

+ +

+ +#define NUMPY_NARY_FUNC_NAME ushort

+ +#define NUMPY_NARY_FUNC_SYM details::ushort

+ +#include "pythonic/types/numpy_nary_expr.hpp"

+ +}

+ +PYTHONIC_NS_END

+ +

+ +#endif

+ diff --git a/pythran/pythonic/types/int.hpp b/pythran/pythonic/types/int.hpp

+ index 96d66d733..b0a0fd6e1 100644

+ --- a/pythran/pythonic/types/int.hpp

+ +++ b/pythran/pythonic/types/int.hpp

+ @@ -102,6 +102,10 @@ struct c_type_to_numpy_type<unsigned short>

+      : std::integral_constant<int, NPY_USHORT> {

+  };

+  

+ +template <>

+ +struct c_type_to_numpy_type<char> : std::integral_constant<int, NPY_BYTE> {

+ +};

+ +

+  template <>

+  struct c_type_to_numpy_type<signed char>

+      : std::integral_constant<int, NPY_BYTE> {

+ @@ -136,6 +140,7 @@ struct c_type_to_numpy_type<bool> : std::integral_constant<int, NPY_BOOL> {

+          nullptr);                                                              \

+    }

+  

+ +PYTHONIC_INT_TO_PYTHON(char)

+  PYTHONIC_INT_TO_PYTHON(unsigned char)

+  PYTHONIC_INT_TO_PYTHON(signed char)

+  PYTHONIC_INT_TO_PYTHON(unsigned short)

+ diff --git a/pythran/tables.py b/pythran/tables.py

+ index 851b30782..4fbb38f3c 100644

+ --- a/pythran/tables.py

+ +++ b/pythran/tables.py

+ @@ -3407,6 +3407,7 @@ def partialsum(seq):

+          ),

+          "bool": ConstFunctionIntr(signature=_bool_signature),

+          "broadcast_to": ConstFunctionIntr(),

+ +        "byte": ConstFunctionIntr(signature=_int_signature),

+          "cbrt": ConstFunctionIntr(

+              signature=_numpy_unary_op_float_signature

+          ),

+ @@ -3835,6 +3836,7 @@ def partialsum(seq):

+              BINARY_UFUNC,

+              signature=_numpy_int_binary_op_signature

+          ),

+ +        "longlong": ConstFunctionIntr(signature=_int_signature),

+          "max": ConstMethodIntr(signature=_numpy_unary_op_axis_signature),

+          "maximum": UFunc(

+              BINARY_UFUNC,

+ @@ -3993,6 +3995,7 @@ def partialsum(seq):

+          "select": ConstFunctionIntr(),

+          "setdiff1d": ConstFunctionIntr(),

+          "shape": ConstFunctionIntr(),

+ +        "short_": ConstFunctionIntr(signature=_int_signature),

+          "sign": ConstFunctionIntr(),

+          "signbit": ConstFunctionIntr(),

+          "sin": ConstFunctionIntr(signature=_numpy_unary_op_float_signature),

+ @@ -4012,6 +4015,7 @@ def partialsum(seq):

+          ),

+          "sum": ConstMethodIntr(signature=_numpy_unary_op_sum_axis_signature),

+          "swapaxes": ConstMethodIntr(),

+ +        "short": ConstFunctionIntr(signature=_int_signature),

+          "take": ConstMethodIntr(),

+          "tan": ConstFunctionIntr(signature=_numpy_unary_op_float_signature),

+          "tanh": ConstFunctionIntr(signature=_numpy_unary_op_float_signature),

+ @@ -4031,10 +4035,12 @@ def partialsum(seq):

+          "uintc": ConstFunctionIntr(signature=_int_signature),

+          "uintp": ConstFunctionIntr(signature=_int_signature),

+          "uint8": ConstFunctionIntr(signature=_int_signature),

+ +        "ulonglong": ConstFunctionIntr(signature=_int_signature),

+          "union1d": ConstFunctionIntr(),

+          "unique": ConstFunctionIntr(),

+          "unwrap": ConstFunctionIntr(),

+          "unravel_index": ConstFunctionIntr(),

+ +        "ushort": ConstFunctionIntr(signature=_int_signature),

+          "var": ConstMethodIntr(),

+          "vstack": ConstFunctionIntr(),

+          "stack": ConstFunctionIntr(),

+ diff --git a/pythran/tests/test_ndarray.py b/pythran/tests/test_ndarray.py

+ index 44577ff51..9461249c6 100644

+ --- a/pythran/tests/test_ndarray.py

+ +++ b/pythran/tests/test_ndarray.py

+ @@ -703,6 +703,21 @@ def test_ndarray_ubyte(self):

+                  4,

+                  ndarray_ubyte=[int])

+  

+ +    def test_ndarray_byte(self):

+ +        self.run_test("def ndarray_byte(n): import numpy; return numpy.arange(-n, n, 1, dtype=numpy.byte)",

+ +                4,

+ +                ndarray_byte=[int])

+ +

+ +    def test_ndarray_ushort(self):

+ +        self.run_test("def ndarray_ushort(n): import numpy; return numpy.arange(0, n, 1, dtype=numpy.ushort)",

+ +                4,

+ +                ndarray_ushort=[int])

+ +

+ +    def test_ndarray_short(self):

+ +        self.run_test("def ndarray_short(n): import numpy; return numpy.arange(-n, n, 1, dtype=numpy.short)",

+ +                4,

+ +                ndarray_short=[int])

+ +

+      def test_ndarray_1d_index(self):

+          self.run_test(

+              'def ndarray_1d_index(a): return a[1], a[-1]',

file modified
+16 -5
@@ -1,5 +1,5 @@ 

  Name:           pythran

- Version:        0.9.3

+ Version:        0.9.4post1

  Release:        1%{?dist}

  Summary:        Ahead of Time Python compiler for numeric kernels

  
@@ -14,6 +14,11 @@ 

  URL:            https://github.com/serge-sans-paille/pythran

  Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz

  

+ # Pythran 0.9.4post1+ 32bit fix

+ # https://github.com/serge-sans-paille/pythran/pull/1419

+ Patch1:         %{url}/commit/b0501d3d6e11d00c8c839adcc2694820ecfa519e.patch

+ Patch2:         %{url}/commit/2be7a91f3d2cf9a863afeb6aae5ca20c0ca2e2c3.patch

+ 

  # there is no actual arched content

  # yet we want to test on all architectures

  # and we also might need to skip some
@@ -64,7 +69,7 @@ 

  instruction units.

  

  %prep

- %autosetup

+ %autosetup -p1

  find -name '*.hpp' -exec chmod -x {} +

  sed -i '1{/#!/d}' pythran/run.py

  
@@ -80,6 +85,9 @@ 

  sed -i 's|blas=blas|blas=openblas|' pythran/pythran-linux*.cfg

  sed -i 's|include_dirs=|include_dirs=/usr/include/openblas|' pythran/pythran-linux*.cfg

  

+ # not yet available in Fedora

+ sed -i '/guzzle_sphinx_theme/d' docs/conf.py

+ 

  %build

  %py3_build

  PYTHONPATH=$PWD/build/lib make -C docs html
@@ -96,8 +104,8 @@ 

  export PATH="$(pwd)/tmppath:$PATH"

  export PYTHONPATH=%{buildroot}%{python3_sitelib}

  

- # test_zig_zag_matrix_run1: https://github.com/serge-sans-paille/pythran/issues/1316

- %{__python3} -m pytest -n auto -k "not test_zig_zag_matrix_run1"

+ # test_numpy_negative_binomial: https://bugzilla.redhat.com/show_bug.cgi?id=1747029#c12

+ %{__python3} -m pytest -n auto -k "not test_numpy_negative_binomial"

  

  %files

  %license LICENSE
@@ -107,9 +115,12 @@ 

  %{_bindir}/%{name}-config

  %{python3_sitelib}/omp/

  %{python3_sitelib}/%{name}/

- %{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info/

+ %{python3_sitelib}/%{name}-*-py%{python3_version}.egg-info/

  

  %changelog

+ * Tue Dec 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.9.4post1-1

+ - Update to 0.9.4post1 (#1747029)

+ 

  * Tue Aug 20 2019 Miro Hrončok <mhroncok@redhat.com> - 0.9.3-1

  - Update to 0.9.3 (#1743187)

  - Allow 32bit architectures

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (pythran-0.9.3.tar.gz) = 2964365c049db1fd989ab6a275d8eb9bb76f7c1476bf98c8bed38b3e3c9f0224ee253c57379f029e792219b3d62caae7dfb14d3f52fce621ee769dc965492ea1

+ SHA512 (pythran-0.9.4post1.tar.gz) = 2b40ef13c1243d4c93dd2ee75a510ecaa3f0121cda92cd3eeac40f459f28104568c795b01d127b1573ec440648540b79ed8fae3fd1afb678a5990b78ada9b3d7

no initial comment

@sergesanspaille some arches failed :(

ppc64le:

=================================== FAILURES ===================================
____________________ TestNumpyRandom.test_numpy_logistic0b _____________________
[gw1] linux -- Python 3.8.0 /usr/bin/python3
self = <pythran.tests.test_numpy_random.TestNumpyRandom testMethod=test_numpy_logistic0b>
    def test_numpy_logistic0b(self):
        """ Check logistic with 2 argument with mean and variance. """
        code = """
        def numpy_logistic0b(size):
            from numpy.random import logistic
            from numpy import var, mean, pi
            u = 2.
            s = 2
            rmean = u
            rvar = ((s**2*pi**2)/3)
            a = logistic(u, s, size)
            return (abs(mean(a) - rmean) < 0.05 and abs(var(a) - rvar) < .05)
        """
>       self.run_test(code, 10 ** 6, numpy_logistic0b=[int])
pythran/tests/test_numpy_random.py:1399: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pythran/tests/__init__.py:340: in run_test
    self.assertAlmostEqual(python_ref, pythran_res)
pythran/tests/__init__.py:165: in assertAlmostEqual
    self.assertEqual(ref, res)
E   AssertionError: True != False
----------------------------- Captured stdout call -----------------------------
Python result:  True
Pythran result:  False
Type of Pythran res :  <class 'bool'>
Type of Python ref :  <class 'numpy.bool_'>

i686/armv7hl:

=================================== FAILURES ===================================
______________________ TestConversion.test_builtin_type0 _______________________
[gw13] linux -- Python 3.8.0 /usr/bin/python3
self = <pythran.tests.test_conversion.TestConversion testMethod=test_builtin_type0>
    def test_builtin_type0(self):
>       self.run_test("def builtin_type0(x): return type(x)(x)", 1, builtin_type0=[int])
pythran/tests/test_conversion.py:173: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pythran/tests/__init__.py:320: in run_test
    cxx_compiled = compile_pythrancode(
pythran/toolchain.py:420: in compile_pythrancode
    output_file = compile_cxxcode(module_name,
pythran/toolchain.py:365: in compile_cxxcode
    output_binary = compile_cxxfile(module_name, fdpath,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
module_name = 'test_builtin_type0', cxxfile = '/tmp/tmp112zg3_j.cpp'
output_binary = None
kwargs = {'extra_compile_args': ['-O0', '-Wall', '-Wno-unknown-pragmas', '-Wno-mismatched-tags', '-Wno-unused-local-typedefs', '-Wno-unknown-warning-option', ...]}
builddir = '/tmp/tmph_lmgp0c', buildtmp = '/tmp/tmppszqlns7'
extension = <pythran.dist.PythranExtension('test_builtin_type0') at 0xf2206b38>
    def compile_cxxfile(module_name, cxxfile, output_binary=None, **kwargs):
        '''c++ file -> native module
        Return the filename of the produced shared library
        Raises CompileError on failure

        '''

        builddir = mkdtemp()
        buildtmp = mkdtemp()

        extension = PythranExtension(module_name,
                                     [cxxfile],
                                     **kwargs)

        try:
            setup(name=module_name,
                  ext_modules=[extension],
                  cmdclass={"build_ext": PythranBuildExt},
                  # fake CLI call
                  script_name='setup.py',
                  script_args=['--verbose'
                               if logger.isEnabledFor(logging.INFO)
                               else '--quiet',
                               'build_ext',
                               '--build-lib', builddir,
                               '--build-temp', buildtmp]
                  )
        except SystemExit as e:
>           raise CompileError(str(e))
E           distutils.errors.CompileError: error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DENABLE_PYTHON_MODULE -D__PYTHRAN__=3 -DPYTHRAN_BLAS_OPENBLAS -I/usr/include/openblas -I/builddir/build/BUILD/pythran-0.9.4post1/pythran -I/usr/lib/python3.8/site-packages/numpy/core/include -I/usr/include/python3.8 -c /tmp/tmp112zg3_j.cpp -o /tmp/tmppszqlns7/tmp/tmp112zg3_j.o -std=c++11 -fno-math-errno -w -fvisibility=hidden -fno-wrapv -O0 -Wall -Wno-unknown-pragmas -Wno-mismatched-tags -Wno-unused-local-typedefs -Wno-unknown-warning-option -Werror -UNDEBUG" failed with exit status 1
pythran/toolchain.py:326: CompileError
...

Thanks for the heads up. The i686 issue is a real one and I need to fix it. we can safely (?) ignore anything random-related, the way we test this is not 100% reliable.

1 new commit added

  • Fix 32bit arches
4 years ago

s390x:

________________________ TestNdarray.test_ndarray_byte _________________________
[gw3] linux -- Python 3.8.0 /usr/bin/python3
self = <pythran.tests.test_ndarray.TestNdarray testMethod=test_ndarray_byte>
    def test_ndarray_byte(self):
>       self.run_test("def ndarray_byte(n): import numpy; return numpy.arange(-n, n, 1, dtype=numpy.byte)",
                4,
                ndarray_byte=[int])
pythran/tests/test_ndarray.py:707: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pythran/tests/__init__.py:340: in run_test
    self.assertAlmostEqual(python_ref, pythran_res)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pythran.tests.test_ndarray.TestNdarray testMethod=test_ndarray_byte>
ref = array([-4, -3, -2, -1,  0,  1,  2,  3], dtype=int8)
res = array([252, 253, 254, 255,   0,   1,   2,   3], dtype=int32)
    def assertAlmostEqual(self, ref, res):
        """
        Improved version of assertAlmostEqual.

        This new version supports nan, complex and ndarray.
        """
        self.check_type(ref, res)
        if isinstance(res, (list, tuple)):
            self.assertEqual(len(res), len(ref))
            for res_v, ref_v in zip(res, ref):
                self.assertAlmostEqual(ref_v, res_v)
        elif isinstance(ref, ndarray):
>           npt.assert_array_almost_equal(ref, res)
E           AssertionError: 
E           Arrays are not almost equal to 6 decimals
E           
E           Mismatch: 50%
E           Max absolute difference: 256
E           Max relative difference: 1.01587302
E            x: array([-4, -3, -2, -1,  0,  1,  2,  3], dtype=int8)
E            y: array([252, 253, 254, 255,   0,   1,   2,   3], dtype=int32)
pythran/tests/__init__.py:142: AssertionError
----------------------------- Captured stdout call -----------------------------
Python result:  [-4 -3 -2 -1  0  1  2  3]
Pythran result:  [252 253 254 255   0   1   2   3]
Type of Pythran res :  <class 'numpy.ndarray'>
Type of Python ref :  <class 'numpy.ndarray'>

2 new commits added

  • Fix 32bit arches
  • Update to 0.9.4post1 (#1747029)
4 years ago

Pull-Request has been merged by churchyard

4 years ago