()
| 430 | |
| 431 | |
| 432 | def test_array_from_dictionary_scalar(): |
| 433 | dictionary = ['foo', 'bar', 'baz'] |
| 434 | arr = pa.DictionaryArray.from_arrays([2, 1, 2, 0], dictionary=dictionary) |
| 435 | |
| 436 | result = pa.repeat(arr[0], 5) |
| 437 | expected = pa.DictionaryArray.from_arrays([2] * 5, dictionary=dictionary) |
| 438 | assert result.equals(expected) |
| 439 | |
| 440 | result = pa.repeat(arr[3], 5) |
| 441 | expected = pa.DictionaryArray.from_arrays([0] * 5, dictionary=dictionary) |
| 442 | assert result.equals(expected) |
| 443 | |
| 444 | |
| 445 | def test_array_getitem(): |