()
| 3106 | |
| 3107 | @pytest.mark.numpy |
| 3108 | def test_array_from_invalid_dim_raises(): |
| 3109 | msg = "only handle 1-dimensional arrays" |
| 3110 | arr2d = np.array([[1, 2, 3], [4, 5, 6]]) |
| 3111 | with pytest.raises(ValueError, match=msg): |
| 3112 | pa.array(arr2d) |
| 3113 | |
| 3114 | arr0d = np.array(0) |
| 3115 | with pytest.raises(ValueError, match=msg): |
| 3116 | pa.array(arr0d) |
| 3117 | |
| 3118 | |
| 3119 | @pytest.mark.numpy |