build(deps): update nalgebra requirement from 0.23.0 to 0.26.2 (#98)

* build(deps): update nalgebra requirement from 0.23.0 to 0.26.2

Updates the requirements on [nalgebra](https://github.com/dimforge/nalgebra) to permit the latest version.
- [Release notes](https://github.com/dimforge/nalgebra/releases)
- [Changelog](https://github.com/dimforge/nalgebra/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/dimforge/nalgebra/compare/v0.23.0...v0.26.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* fix: updates for nalgebre

* test: explicitly call pow_mut from BaseVector since now it conflicts with nalgebra implementation

* Don't be strict with dependencies

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
This commit is contained in:
dependabot-preview[bot]
2022-05-11 13:04:27 -04:00
committed by GitHub
parent 70df9a8b49
commit 322610c7fb
2 changed files with 10 additions and 10 deletions
+6 -6
View File
@@ -20,12 +20,12 @@ datasets = []
[dependencies] [dependencies]
ndarray = { version = "0.15", optional = true } ndarray = { version = "0.15", optional = true }
nalgebra = { version = "0.23.0", optional = true } nalgebra = { version = "0.26", optional = true }
num-traits = "0.2.12" num-traits = "0.2"
num = "0.4.0" num = "0.4"
rand = "0.8.3" rand = "0.8"
rand_distr = "0.4.0" rand_distr = "0.4"
serde = { version = "1.0.115", features = ["derive"], optional = true } serde = { version = "1", features = ["derive"], optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies] [target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2", features = ["js"] } getrandom = { version = "0.2", features = ["js"] }
+4 -4
View File
@@ -40,7 +40,7 @@
use std::iter::Sum; use std::iter::Sum;
use std::ops::{AddAssign, DivAssign, MulAssign, Range, SubAssign}; use std::ops::{AddAssign, DivAssign, MulAssign, Range, SubAssign};
use nalgebra::{DMatrix, Dynamic, Matrix, MatrixMN, RowDVector, Scalar, VecStorage, U1}; use nalgebra::{Const, DMatrix, Dynamic, Matrix, OMatrix, RowDVector, Scalar, VecStorage, U1};
use crate::linalg::cholesky::CholeskyDecomposableMatrix; use crate::linalg::cholesky::CholeskyDecomposableMatrix;
use crate::linalg::evd::EVDDecomposableMatrix; use crate::linalg::evd::EVDDecomposableMatrix;
@@ -53,7 +53,7 @@ use crate::linalg::Matrix as SmartCoreMatrix;
use crate::linalg::{BaseMatrix, BaseVector}; use crate::linalg::{BaseMatrix, BaseVector};
use crate::math::num::RealNumber; use crate::math::num::RealNumber;
impl<T: RealNumber + 'static> BaseVector<T> for MatrixMN<T, U1, Dynamic> { impl<T: RealNumber + 'static> BaseVector<T> for OMatrix<T, U1, Dynamic> {
fn get(&self, i: usize) -> T { fn get(&self, i: usize) -> T {
*self.get((0, i)).unwrap() *self.get((0, i)).unwrap()
} }
@@ -198,7 +198,7 @@ impl<T: RealNumber + Scalar + AddAssign + SubAssign + MulAssign + DivAssign + Su
fn to_row_vector(self) -> Self::RowVector { fn to_row_vector(self) -> Self::RowVector {
let (nrows, ncols) = self.shape(); let (nrows, ncols) = self.shape();
self.reshape_generic(U1, Dynamic::new(nrows * ncols)) self.reshape_generic(Const::<1>, Dynamic::new(nrows * ncols))
} }
fn get(&self, row: usize, col: usize) -> T { fn get(&self, row: usize, col: usize) -> T {
@@ -955,7 +955,7 @@ mod tests {
#[test] #[test]
fn pow_mut() { fn pow_mut() {
let mut a = DMatrix::from_row_slice(1, 3, &[1., 2., 3.]); let mut a = DMatrix::from_row_slice(1, 3, &[1., 2., 3.]);
a.pow_mut(3.); BaseMatrix::pow_mut(&mut a, 3.);
assert_eq!(a, DMatrix::from_row_slice(1, 3, &[1., 8., 27.])); assert_eq!(a, DMatrix::from_row_slice(1, 3, &[1., 8., 27.]));
} }