pysiglib.words

Contents

pysiglib.words#

Added in version v1.1.0.

words(alphabet_size, max_length)[source]#

Returns all words up to a given length.

Parameters:
  • alphabet_size (int) – Size of the alphabet.

  • max_length (int) – Max length of words.

Returns:

All words up to the given length.

Return type:

list[tuple[int, …]]

Example:#

import pysiglib

# All words up to length 2 over alphabet {0, 1}
w = pysiglib.words(2, 2)
print(w) # [(), (0,), (1,), (0, 0), (0, 1), (1, 0), (1, 1)]

Citation#

If you found this library useful in your research, please consider citing the paper:

@article{shmelev2025pysiglib,
  title={pySigLib-Fast Signature-Based Computations on CPU and GPU},
  author={Shmelev, Daniil and Salvi, Cristopher},
  journal={arXiv preprint arXiv:2509.10613},
  year={2025}
}