giotto-ai / giotto-tda

A high-performance topological machine learning toolbox in Python
https://giotto-ai.github.io/gtda-docs
Other
858 stars 175 forks source link

Use defaultdict in mapper's Nerve #552

Closed ulupo closed 3 years ago

ulupo commented 3 years ago

Types of changes

Description Small enhancement to the internals of Nerve.fit. collections.defaultdict is used instead of a vanilla Python dict as suggested in the Python documentation for such cases (see https://docs.python.org/3/library/collections.html#collections.defaultdict, under "defaultdict Examples").

Checklist