TutteInstitute / vectorizers

Vectorizers for a range of different data types
BSD 3-Clause "New" or "Revised" License
93 stars 23 forks source link

Set up ``__getstate__`` and ``__setstate__`` and add serialization tests #64

Open lmcinnes opened 3 years ago

lmcinnes commented 3 years ago

Most things should just pickle, however numba based attributes (functions and types such as numba.typed.List) need special handling with __getstate__ and __setstate__ methods to handle conversion of numba bits and pieces.

To aid in this we should have tests that all classes can be pickled and unpickled successfully. This will help highlight any shortcomings.

See also #62