()
| 343 | |
| 344 | |
| 345 | def test_ans_encode_reverse1(): |
| 346 | # Define a concrete categorical entropy model over the (implied) |
| 347 | # alphabet {0, 1, 2}: |
| 348 | probabilities = np.array([0.1, 0.6, 0.3], dtype=np.float64) |
| 349 | model = constriction.stream.model.Categorical(probabilities, perfect=False) |
| 350 | |
| 351 | # Encode a single symbol with this entropy model: |
| 352 | coder = constriction.stream.stack.AnsCoder() |
| 353 | coder.encode_reverse(2, model) # Encodes the symbol `2`. |
| 354 | |
| 355 | |
| 356 | def test_ans_encode_reverse2(): |
nothing calls this directly
no test coverage detected