()
| 471 | |
| 472 | @pytest.mark.numpy |
| 473 | def test_buffer_to_numpy(): |
| 474 | # Make sure creating a numpy array from an arrow buffer works |
| 475 | byte_array = bytearray(20) |
| 476 | byte_array[0] = 42 |
| 477 | buf = pa.py_buffer(byte_array) |
| 478 | array = np.frombuffer(buf, dtype="uint8") |
| 479 | assert array[0] == byte_array[0] |
| 480 | byte_array[0] += 1 |
| 481 | assert array[0] == byte_array[0] |
| 482 | assert array.base == buf |
| 483 | |
| 484 | |
| 485 | @pytest.mark.numpy |
nothing calls this directly
no outgoing calls
no test coverage detected