Skip to content

Commit 322610c

Browse files
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](dimforge/nalgebra@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>
1 parent 70df9a8 commit 322610c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ datasets = []
2020

2121
[dependencies]
2222
ndarray = { version = "0.15", optional = true }
23-
nalgebra = { version = "0.23.0", optional = true }
24-
num-traits = "0.2.12"
25-
num = "0.4.0"
26-
rand = "0.8.3"
27-
rand_distr = "0.4.0"
28-
serde = { version = "1.0.115", features = ["derive"], optional = true }
23+
nalgebra = { version = "0.26", optional = true }
24+
num-traits = "0.2"
25+
num = "0.4"
26+
rand = "0.8"
27+
rand_distr = "0.4"
28+
serde = { version = "1", features = ["derive"], optional = true }
2929

3030
[target.'cfg(target_arch = "wasm32")'.dependencies]
3131
getrandom = { version = "0.2", features = ["js"] }

src/linalg/nalgebra_bindings.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
use std::iter::Sum;
4141
use std::ops::{AddAssign, DivAssign, MulAssign, Range, SubAssign};
4242

43-
use nalgebra::{DMatrix, Dynamic, Matrix, MatrixMN, RowDVector, Scalar, VecStorage, U1};
43+
use nalgebra::{Const, DMatrix, Dynamic, Matrix, OMatrix, RowDVector, Scalar, VecStorage, U1};
4444

4545
use crate::linalg::cholesky::CholeskyDecomposableMatrix;
4646
use crate::linalg::evd::EVDDecomposableMatrix;
@@ -53,7 +53,7 @@ use crate::linalg::Matrix as SmartCoreMatrix;
5353
use crate::linalg::{BaseMatrix, BaseVector};
5454
use crate::math::num::RealNumber;
5555

56-
impl<T: RealNumber + 'static> BaseVector<T> for MatrixMN<T, U1, Dynamic> {
56+
impl<T: RealNumber + 'static> BaseVector<T> for OMatrix<T, U1, Dynamic> {
5757
fn get(&self, i: usize) -> T {
5858
*self.get((0, i)).unwrap()
5959
}
@@ -198,7 +198,7 @@ impl<T: RealNumber + Scalar + AddAssign + SubAssign + MulAssign + DivAssign + Su
198198

199199
fn to_row_vector(self) -> Self::RowVector {
200200
let (nrows, ncols) = self.shape();
201-
self.reshape_generic(U1, Dynamic::new(nrows * ncols))
201+
self.reshape_generic(Const::<1>, Dynamic::new(nrows * ncols))
202202
}
203203

204204
fn get(&self, row: usize, col: usize) -> T {
@@ -955,7 +955,7 @@ mod tests {
955955
#[test]
956956
fn pow_mut() {
957957
let mut a = DMatrix::from_row_slice(1, 3, &[1., 2., 3.]);
958-
a.pow_mut(3.);
958+
BaseMatrix::pow_mut(&mut a, 3.);
959959
assert_eq!(a, DMatrix::from_row_slice(1, 3, &[1., 8., 27.]));
960960
}
961961

0 commit comments

Comments
 (0)