| 4353 | @pytest.mark.numpy |
| 4354 | @pytest.mark.parametrize('numpy_native_dtype', ['u2', 'i4', 'f8']) |
| 4355 | def test_swapped_byte_order_fails(numpy_native_dtype): |
| 4356 | # ARROW-39129 |
| 4357 | |
| 4358 | numpy_swapped_dtype = np.dtype(numpy_native_dtype).newbyteorder() |
| 4359 | np_arr = np.arange(10, dtype=numpy_swapped_dtype) |
| 4360 | |
| 4361 | # Primitive type array, type is inferred from the numpy array |
| 4362 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4363 | pa.array(np_arr) |
| 4364 | |
| 4365 | # Primitive type array, type is explicitly provided |
| 4366 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4367 | pa.array(np_arr, type=pa.float64()) |
| 4368 | |
| 4369 | # List type array |
| 4370 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4371 | pa.array([np_arr]) |
| 4372 | |
| 4373 | # Struct type array |
| 4374 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4375 | pa.StructArray.from_arrays([np_arr], names=['a']) |
| 4376 | |
| 4377 | |
| 4378 | def test_non_cpu_array(): |