| 4536 | @pytest.mark.numpy |
| 4537 | @pytest.mark.parametrize('numpy_native_dtype', ['u2', 'i4', 'f8']) |
| 4538 | def test_swapped_byte_order_fails(numpy_native_dtype): |
| 4539 | # ARROW-39129 |
| 4540 | |
| 4541 | numpy_swapped_dtype = np.dtype(numpy_native_dtype).newbyteorder() |
| 4542 | np_arr = np.arange(10, dtype=numpy_swapped_dtype) |
| 4543 | |
| 4544 | # Primitive type array, type is inferred from the numpy array |
| 4545 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4546 | pa.array(np_arr) |
| 4547 | |
| 4548 | # Primitive type array, type is explicitly provided |
| 4549 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4550 | pa.array(np_arr, type=pa.float64()) |
| 4551 | |
| 4552 | # List type array |
| 4553 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4554 | pa.array([np_arr]) |
| 4555 | |
| 4556 | # Struct type array |
| 4557 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4558 | pa.StructArray.from_arrays([np_arr], names=['a']) |
| 4559 | |
| 4560 | |
| 4561 | def test_non_cpu_array(): |