| 4294 | @pytest.mark.numpy |
| 4295 | @pytest.mark.parametrize('numpy_native_dtype', ['u2', 'i4', 'f8']) |
| 4296 | def test_swapped_byte_order_fails(numpy_native_dtype): |
| 4297 | # ARROW-39129 |
| 4298 | |
| 4299 | numpy_swapped_dtype = np.dtype(numpy_native_dtype).newbyteorder() |
| 4300 | np_arr = np.arange(10, dtype=numpy_swapped_dtype) |
| 4301 | |
| 4302 | # Primitive type array, type is inferred from the numpy array |
| 4303 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4304 | pa.array(np_arr) |
| 4305 | |
| 4306 | # Primitive type array, type is explicitly provided |
| 4307 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4308 | pa.array(np_arr, type=pa.float64()) |
| 4309 | |
| 4310 | # List type array |
| 4311 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4312 | pa.array([np_arr]) |
| 4313 | |
| 4314 | # Struct type array |
| 4315 | with pytest.raises(pa.ArrowNotImplementedError): |
| 4316 | pa.StructArray.from_arrays([np_arr], names=['a']) |
| 4317 | |
| 4318 | |
| 4319 | def test_non_cpu_array(): |