| 379 | @parametrize_with_collections_types |
| 380 | @pytest.mark.parametrize("pa_type", pa_int_types) |
| 381 | def test_sequence_integer_np_nan(seq, pa_type): |
| 382 | # ARROW-2806: numpy.nan is a double value and thus should produce |
| 383 | # a double array. |
| 384 | with pytest.raises(ValueError): |
| 385 | pa.array(seq([np.nan]), type=pa_type, from_pandas=False) |
| 386 | |
| 387 | arr = pa.array(seq([np.nan]), type=pa_type, from_pandas=True) |
| 388 | expected = [None] |
| 389 | assert len(arr) == 1 |
| 390 | assert arr.null_count == 1 |
| 391 | assert arr.type == pa_type |
| 392 | assert arr.to_pylist() == expected |
| 393 | |
| 394 | |
| 395 | @pytest.mark.numpy |