Update dependencies

This commit is contained in:
Dirkjan Ochtman 2022-03-28 11:18:14 +02:00
parent c46487ff55
commit cce042978c
4 changed files with 6 additions and 11 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "instant-distance-py" name = "instant-distance-py"
version = "0.3.1" version = "0.3.2"
authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>"] authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>"]
edition = "2018" edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -19,7 +19,7 @@ bincode = "1.3.1"
instant-distance = { version = "0.5", path = "../instant-distance", features = ["with-serde"] } instant-distance = { version = "0.5", path = "../instant-distance", features = ["with-serde"] }
pyo3 = { version = "0.16", features = ["extension-module"] } pyo3 = { version = "0.16", features = ["extension-module"] }
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
serde-big-array = "0.3.2" serde-big-array = "0.4.1"
[package.metadata.maturin] [package.metadata.maturin]
name = "instant-distance" name = "instant-distance"

View File

@ -11,7 +11,7 @@ use pyo3::proc_macro::{pyclass, pymethods, pymodule};
use pyo3::types::{PyList, PyModule, PyString}; use pyo3::types::{PyList, PyModule, PyString};
use pyo3::{Py, PyAny, PyErr, PyObject, PyRef, PyRefMut, PyResult, Python}; use pyo3::{Py, PyAny, PyErr, PyObject, PyRef, PyRefMut, PyResult, Python};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use serde_big_array::big_array; use serde_big_array::BigArray;
#[pymodule] #[pymodule]
fn instant_distance(_: Python, m: &PyModule) -> PyResult<()> { fn instant_distance(_: Python, m: &PyModule) -> PyResult<()> {
@ -362,8 +362,6 @@ impl TryFrom<&PyAny> for FloatArray {
} }
} }
big_array! { BigArray; DIMENSIONS }
impl Point for FloatArray { impl Point for FloatArray {
fn distance(&self, rhs: &Self) -> f32 { fn distance(&self, rhs: &Self) -> f32 {
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]

View File

@ -1,6 +1,6 @@
[package] [package]
name = "instant-distance" name = "instant-distance"
version = "0.5.0" version = "0.5.1"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>"] authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>"]
edition = "2018" edition = "2018"
@ -22,7 +22,7 @@ parking_lot = "0.12"
rand = { version = "0.8", features = ["small_rng"] } rand = { version = "0.8", features = ["small_rng"] }
rayon = "1.5" rayon = "1.5"
serde = { version = "1.0.118", features = ["derive"], optional = true } 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] [dev-dependencies]
bencher = "0.1.5" bencher = "0.1.5"

View File

@ -6,7 +6,7 @@ use parking_lot::{MappedRwLockReadGuard, RwLock, RwLockReadGuard};
#[cfg(feature = "serde")] #[cfg(feature = "serde")]
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[cfg(feature = "serde-big-array")] #[cfg(feature = "serde-big-array")]
use serde_big_array::big_array; use serde_big_array::BigArray;
use crate::{Hnsw, Point, M}; 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_attr(feature = "serde", serde(with = "BigArray"))] pub(crate) [PointId; M * 2],
); );
#[cfg(feature = "serde-big-array")]
big_array! { BigArray; }
impl ZeroNode { impl ZeroNode {
pub(crate) fn rewrite(&mut self, mut iter: impl Iterator<Item = PointId>) { pub(crate) fn rewrite(&mut self, mut iter: impl Iterator<Item = PointId>) {
for slot in self.0.iter_mut() { for slot in self.0.iter_mut() {