| 4411 | @pytest.mark.numpy |
| 4412 | @pytest.mark.parametrize('numpy_native_dtype', ['u2', 'i4', 'f8']) |
| 4413 | def test_swapped_byte_order_fails(numpy_native_dtype): |
| 4414 | # ARROW-39129 |
| 4415 | |
| 4416 | numpy_swapped_dtype = np.dtype(numpy_native_dtype).newbyteorder() |
| 4417 | np_arr = np.arange(10, dtype=numpy_swapped_dtype) |
| 4418 | |
| 4419 | # Primitive type array, type is inferred from the numpy array |
| 4420 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4421 | pa.array(np_arr) |
| 4422 | |
| 4423 | # Primitive type array, type is explicitly provided |
| 4424 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4425 | pa.array(np_arr, type=pa.float64()) |
| 4426 | |
| 4427 | # List type array |
| 4428 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4429 | pa.array([np_arr]) |
| 4430 | |
| 4431 | # Struct type array |
| 4432 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4433 | pa.StructArray.from_arrays([np_arr], names=['a']) |
| 4434 | |
| 4435 | |
| 4436 | def test_non_cpu_array(): |