diff --git a/Cargo.toml b/Cargo.toml index 79d52997..e940f8e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "peroxide" -version = "0.38.0" +version = "0.38.1" authors = ["axect "] edition = "2018" description = "Rust comprehensive scientific computation library contains linear algebra, numerical analysis, statistics and machine learning tools with farmiliar syntax" diff --git a/RELEASES.md b/RELEASES.md index d73626db..bf3a8480 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,4 +1,8 @@ -# Release 0.38.0 +# Release 0.38.1 (2024-11-06) + +- Fix error in `O3` feature + +# Release 0.38.0 (Yanked) ## New features - Complex & Parallel diff --git a/src/complex/matrix.rs b/src/complex/matrix.rs index cc489e88..37cb06e0 100644 --- a/src/complex/matrix.rs +++ b/src/complex/matrix.rs @@ -16,7 +16,7 @@ use crate::{ traits::fp::{FPMatrix, FPVector}, traits::general::Algorithm, traits::math::{InnerProduct, LinearOp, MatrixProduct, Norm, Normed, Vector}, - traits::matrix::{Form, LinearAlgebra, MatrixTrait, SolveKind, PQLU, QR, SVD, WAZD}, + traits::matrix::{Form, LinearAlgebra, MatrixTrait, SolveKind, PQLU, QR, SVD, WAZD, UPLO}, traits::mutable::MutMatrix, util::low_level::{copy_vec_ptr, swap_vec_ptr}, util::non_macro::ConcatenateError, @@ -879,7 +879,6 @@ pub fn complex_cbind(m1: ComplexMatrix, m2: ComplexMatrix) -> Result Result { let mut temp = m1; if temp.shape != Shape::Row { diff --git a/src/fuga/mod.rs b/src/fuga/mod.rs index 6159073b..27fb1a76 100644 --- a/src/fuga/mod.rs +++ b/src/fuga/mod.rs @@ -220,7 +220,7 @@ pub use crate::statistics::stat::QType::{ }; pub use crate::structure::ad::AD::*; pub use crate::structure::dataframe::DType::*; -pub use crate::structure::matrix::UPLO::{Lower, Upper}; +pub use crate::traits::matrix::UPLO::{Lower, Upper}; pub use crate::traits::matrix::{ Form::{Diagonal, Identity}, SolveKind::{LU, WAZ}, diff --git a/src/prelude/simpler.rs b/src/prelude/simpler.rs index 890f7d07..71aa4a84 100644 --- a/src/prelude/simpler.rs +++ b/src/prelude/simpler.rs @@ -11,7 +11,8 @@ use crate::structure::dataframe::{DataFrame, WithParquet}; use crate::structure::matrix::Matrix; use crate::structure::polynomial; use crate::traits::math::{Norm, Normed}; -use crate::traits::matrix::{Form, LinearAlgebra, MatrixTrait, SolveKind, PQLU, QR, WAZD}; +#[allow(unused_imports)] +use crate::traits::matrix::{Form, LinearAlgebra, MatrixTrait, SolveKind, PQLU, QR, WAZD, UPLO}; #[cfg(feature = "parquet")] use arrow2::io::parquet::write::CompressionOptions; #[cfg(feature = "parquet")] diff --git a/src/structure/matrix.rs b/src/structure/matrix.rs index 62dfc722..5dead262 100644 --- a/src/structure/matrix.rs +++ b/src/structure/matrix.rs @@ -624,9 +624,10 @@ use crate::traits::{ fp::{FPMatrix, FPVector}, general::Algorithm, math::{InnerProduct, LinearOp, MatrixProduct, Norm, Normed, Vector}, - matrix::{Form, LinearAlgebra, MatrixTrait, SolveKind, PQLU, QR, SVD, WAZD}, + matrix::{Form, LinearAlgebra, MatrixTrait, SolveKind, PQLU, QR, SVD, WAZD, UPLO}, mutable::MutMatrix, }; +#[allow(unused_imports)] use crate::util::{ low_level::{copy_vec_ptr, swap_vec_ptr}, non_macro::{cbind, eye, rbind, zeros}, @@ -3538,6 +3539,7 @@ impl LinearAlgebra for Matrix { Some(dgrf) => match dgrf.status { LAPACK_STATUS::Singular => panic!("Try solve for Singluar matrix"), LAPACK_STATUS::NonSingular => { + let b = b.to_vec(); lapack_dgetrs(&dgrf, &(b.into())).unwrap().into() } }, @@ -4238,13 +4240,6 @@ pub enum POSITIVE_STATUS { Failed(i32), } -#[allow(non_camel_case_types)] -#[derive(Debug, Copy, Clone, Eq, PartialEq)] -pub enum UPLO { - Upper, - Lower, -} - /// Temporary data structure from `dgetrf` #[derive(Debug, Clone)] pub struct DGETRF { diff --git a/src/structure/sparse.rs b/src/structure/sparse.rs index d4ec390d..6ce51f3e 100644 --- a/src/structure/sparse.rs +++ b/src/structure/sparse.rs @@ -4,10 +4,9 @@ use crate::structure::matrix::Matrix; use crate::traits::math::LinearOp; -use crate::traits::matrix::{Form, LinearAlgebra, SolveKind, PQLU, QR, SVD, WAZD}; +#[allow(unused_imports)] +use crate::traits::matrix::{Form, LinearAlgebra, SolveKind, PQLU, QR, SVD, WAZD, UPLO}; //use crate::traits::math::{InnerProduct, LinearOp, Norm, Normed, Vector}; -#[cfg(feature = "O3")] -use crate::fuga::UPLO; use crate::util::non_macro::zeros; use std::ops::Mul; diff --git a/src/traits/matrix.rs b/src/traits/matrix.rs index ce609bb0..a2d14c40 100644 --- a/src/traits/matrix.rs +++ b/src/traits/matrix.rs @@ -105,6 +105,13 @@ pub enum SolveKind { WAZ, } +#[allow(non_camel_case_types)] +#[derive(Debug, Copy, Clone, Eq, PartialEq)] +pub enum UPLO { + Upper, + Lower, +} + impl QR { pub fn q(&self) -> &M { &self.q