Closed
Description
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
Problem description
After applying #3682, pybind 2.9.1 successfully builds with numpy 1.22.0 on several Fedora architectures.
https://koji.fedoraproject.org/koji/taskinfo?taskID=82606547
The tests fail, however, on ppc64le:
=================================== FAILURES ===================================
________________________________ test_recarray _________________________________
simple_dtype = dtype({'names': ['bool_', 'uint_', 'float_', 'ldbl_'], 'formats': ['?', '<u4', '<f4', '<f16'], 'offsets': [0, 4, 8, 16], 'itemsize': 32})
packed_dtype = dtype([('bool_', '?'), ('uint_', '<u4'), ('float_', '<f4'), ('ldbl_', '<f16')])
def test_recarray(simple_dtype, packed_dtype):
elements = [(False, 0, 0.0, -0.0), (True, 1, 1.5, -2.5), (False, 2, 3.0, -5.0)]
for func, dtype in [
(m.create_rec_simple, simple_dtype),
(m.create_rec_packed, packed_dtype),
]:
arr = func(0)
assert arr.dtype == dtype
assert_equal(arr, [], simple_dtype)
assert_equal(arr, [], packed_dtype)
arr = func(3)
assert arr.dtype == dtype
assert_equal(arr, elements, simple_dtype)
assert_equal(arr, elements, packed_dtype)
# Show what recarray's look like in NumPy.
assert type(arr[0]) == np.void
assert type(arr[0].item()) == tuple
if dtype == simple_dtype:
> assert m.print_rec_simple(arr) == [
"s:0,0,0,-0",
"s:1,1,1.5,-2.5",
"s:0,2,3,-5",
]
E AssertionError: assert ['s:0,0,0,6.9...6.95329e-310'] == ['s:0,0,0,-0'... 's:0,2,3,-5']
E At index 0 diff: 's:0,0,0,6.95329e-310' != 's:0,0,0,-0'
E Use -v to get the full diff
../../tests/test_numpy_dtypes.py:205: AssertionError
=============================== warnings summary ===============================
Reproducible example code
No response