Skip to content

v0.3.2

Choose a tag to compare

@tvanreenen tvanreenen released this 27 Jul 20:16
· 32 commits to main since this release
d2c481c

Summary

Version 0.3.2 is a reliability and performance patch that makes existing vector storage, search, metadata, and persistence behavior safer and more predictable. It does not change public method signatures or the existing vectors and metadata .npz archive format.

Numerical reliability

  • Reject vectors, queries, and search thresholds that contain non-finite values or cannot remain finite when represented as float32.
  • Calculate norms and raw metric intermediates with float64 where float32 could overflow or underflow.
  • Allow zero vectors in raw stores for dot-product and Euclidean search.
  • Raise a clear error when raw cosine search includes a zero vector, where cosine similarity is undefined.
  • Avoid duplicate full-size float64 buffers during raw Euclidean distance calculations.

Persistence

  • Resolve paths without an .npz suffix consistently for both saving and loading.
  • Allow load() to be retried after a missing persistence file is created.
  • Let clear() reset load state so a later explicit load() can restore saved rows.
  • Keep repeated load() calls idempotent after a successful load.

Metadata

  • Preserve tuple, list, dataclass, scalar, and dictionary values as individual opaque metadata rows.
  • Keep payload boundaries intact through insertion, search results, saving, and loading.
  • Continue rejecting explicitly multidimensional NumPy metadata arrays rather than silently flattening ambiguous input.

Search memory use

  • Search the stored vector matrix directly when within_rows is omitted instead of copying every stored row first.
  • Preserve original store indexes and metadata during filtered searches.
  • Document the temporary matrix allocation used when within_rows selects a subset.

Compatibility and validation

  • Validate Python 3.10 through 3.14 in GitHub Actions.
  • Add a dedicated Python 3.10 check for the minimum supported NumPy version.
  • Raise the minimum NumPy requirement from 1.20 to 1.21.3.
  • Require linting, formatting, type checking, and the full test matrix before PyPI publication.

Upgrade notes

  • Existing trusted .npz archives remain readable.
  • Environments using NumPy 1.20 must upgrade to NumPy 1.21.3 or newer.
  • Inputs that previously produced nan, inf, or unreliable rankings now raise ValueError.

See the repository changelog for the complete release record.

Full comparison: v0.3.1...v0.3.2