MCPcopy Create free account
hub / github.com/apache/arrow / test_array_from_dictionary_scalar

Function test_array_from_dictionary_scalar

python/pyarrow/tests/test_array.py:432–442  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

430
431
432def 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
445def test_array_getitem():

Callers

nothing calls this directly

Calls 1

equalsMethod · 0.80

Tested by

no test coverage detected