diff --git a/instant-distance-py/Cargo.toml b/instant-distance-py/Cargo.toml index dadd01e..d1d2a00 100644 --- a/instant-distance-py/Cargo.toml +++ b/instant-distance-py/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "instant-distance-py" -version = "0.3.1" +version = "0.3.2" authors = ["Dirkjan Ochtman "] edition = "2018" license = "MIT OR Apache-2.0" @@ -17,9 +17,9 @@ crate-type = ["cdylib"] [dependencies] bincode = "1.3.1" instant-distance = { version = "0.5", path = "../instant-distance", features = ["with-serde"] } -pyo3 = { version = "0.15", features = ["extension-module"] } +pyo3 = { version = "0.16", features = ["extension-module"] } serde = { version = "1", features = ["derive"] } -serde-big-array = "0.3.2" +serde-big-array = "0.4.1" [package.metadata.maturin] name = "instant-distance" diff --git a/instant-distance-py/src/lib.rs b/instant-distance-py/src/lib.rs index d4f4b34..9ad2385 100644 --- a/instant-distance-py/src/lib.rs +++ b/instant-distance-py/src/lib.rs @@ -11,7 +11,7 @@ use pyo3::proc_macro::{pyclass, pymethods, pymodule}; use pyo3::types::{PyList, PyModule, PyString}; use pyo3::{Py, PyAny, PyErr, PyObject, PyRef, PyRefMut, PyResult, Python}; use serde::{Deserialize, Serialize}; -use serde_big_array::big_array; +use serde_big_array::BigArray; #[pymodule] fn instant_distance(_: Python, m: &PyModule) -> PyResult<()> { @@ -362,8 +362,6 @@ impl TryFrom<&PyAny> for FloatArray { } } -big_array! { BigArray; DIMENSIONS } - impl Point for FloatArray { fn distance(&self, rhs: &Self) -> f32 { #[cfg(target_arch = "x86_64")] diff --git a/instant-distance/Cargo.toml b/instant-distance/Cargo.toml index 9ce8675..b1aa366 100644 --- a/instant-distance/Cargo.toml +++ b/instant-distance/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "instant-distance" -version = "0.5.0" +version = "0.5.1" license = "MIT OR Apache-2.0" authors = ["Dirkjan Ochtman "] edition = "2018" @@ -18,11 +18,11 @@ with-serde = ["serde", "serde-big-array"] indicatif = { version = "0.16", optional = true } num_cpus = "1.13" ordered-float = "2.0" -parking_lot = "0.11" +parking_lot = "0.12" rand = { version = "0.8", features = ["small_rng"] } rayon = "1.5" serde = { version = "1.0.118", features = ["derive"], optional = true } -serde-big-array = { version = "0.3.1", optional = true } +serde-big-array = { version = "0.4.1", optional = true } [dev-dependencies] bencher = "0.1.5" diff --git a/instant-distance/src/types.rs b/instant-distance/src/types.rs index f2845f1..d6a03fe 100644 --- a/instant-distance/src/types.rs +++ b/instant-distance/src/types.rs @@ -6,7 +6,7 @@ use parking_lot::{MappedRwLockReadGuard, RwLock, RwLockReadGuard}; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; #[cfg(feature = "serde-big-array")] -use serde_big_array::big_array; +use serde_big_array::BigArray; use crate::{Hnsw, Point, M}; @@ -84,9 +84,6 @@ pub(crate) struct ZeroNode( #[cfg_attr(feature = "serde", serde(with = "BigArray"))] pub(crate) [PointId; M * 2], ); -#[cfg(feature = "serde-big-array")] -big_array! { BigArray; } - impl ZeroNode { pub(crate) fn rewrite(&mut self, mut iter: impl Iterator) { for slot in self.0.iter_mut() {