Skip to content

v0.2.1

Choose a tag to compare

@basnijholt basnijholt released this 10 Jun 19:33
c6d6de4

Patch release: Triangulation now supports pickle, copy.copy, and copy.deepcopy (#11).

The Python reference is a plain class and pickles for free; the Rust class did not, which broke LearnerND.save(), copy.deepcopy(learner), and pickling learners for distributed runners (LearnerND._get_data deepcopies the learner's __dict__, triangulation included).

  • the constructor gained an optional simplices argument that restores an exact prior state without re-triangulating (hand-modified simplex sets and unconnected vertices survive)
  • __reduce__ serializes (vertices, simplices) and reconstructs through it; simplices are sorted, so equal triangulations pickle to identical bytes
  • the class now resolves as adaptive_triangulation._rust.Triangulation instead of advertising itself as builtins.Triangulation

Full changelog: v0.2.0...v0.2.1