MCPcopy Create free account
hub / github.com/dmlc/decord / test_add_padding

Function test_add_padding

tests/python/unittests/test_audio_reader.py:66–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64 ar.get_info()
65
66def test_add_padding():
67 ar = get_single_channel_reader()
68 num_channels = ar.shape()[0]
69 num_padding = ar.add_padding()
70 assert np.array_equal(ar[:num_padding].asnumpy(), np.zeros((num_channels, num_padding)))
71
72def test_free():
73 ar = get_single_channel_reader()

Callers

nothing calls this directly

Calls 4

add_paddingMethod · 0.80
asnumpyMethod · 0.80
shapeMethod · 0.45

Tested by

no test coverage detected