diff --git a/Cargo.toml b/Cargo.toml index 77343155..9b5bf8b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "smartcore" description = "Machine Learning in Rust." homepage = "https://smartcorelib.org" -version = "0.4.5" +version = "0.4.6" authors = ["smartcore Developers"] edition = "2021" license = "Apache-2.0" diff --git a/src/algorithm/neighbour/mod.rs b/src/algorithm/neighbour/mod.rs index c13e914a..4a60365b 100644 --- a/src/algorithm/neighbour/mod.rs +++ b/src/algorithm/neighbour/mod.rs @@ -1,4 +1,4 @@ -#![allow(clippy::ptr_arg)] +#![allow(clippy::ptr_arg, clippy::needless_range_loop)] //! # Nearest Neighbors Search Algorithms and Data Structures //! //! Nearest neighbor search is a basic computational tool that is particularly relevant to machine learning, diff --git a/src/cluster/mod.rs b/src/cluster/mod.rs index eb8c39ff..a268f50c 100644 --- a/src/cluster/mod.rs +++ b/src/cluster/mod.rs @@ -1,3 +1,4 @@ +#![allow(clippy::ptr_arg, clippy::needless_range_loop)] //! # Clustering //! //! Clustering is the type of unsupervised learning where you divide the population or data points into a number of groups such that data points in the same groups diff --git a/src/dataset/mod.rs b/src/dataset/mod.rs index d7d456c6..91628942 100644 --- a/src/dataset/mod.rs +++ b/src/dataset/mod.rs @@ -1,3 +1,4 @@ +#![allow(clippy::ptr_arg, clippy::needless_range_loop)] //! Datasets //! //! In this module you will find small datasets that are used in `smartcore` mostly for demonstration purposes. diff --git a/src/linalg/basic/matrix.rs b/src/linalg/basic/matrix.rs index 1a4ae4dc..58f9846a 100644 --- a/src/linalg/basic/matrix.rs +++ b/src/linalg/basic/matrix.rs @@ -385,7 +385,7 @@ impl Array for DenseMatrix } fn is_empty(&self) -> bool { - self.ncols > 0 && self.nrows > 0 + self.ncols < 1 || self.nrows < 1 } fn iterator<'b>(&'b self, axis: u8) -> Box + 'b> {