dimforge / dimforge/nalgebra

Comparison methods panic for differently sized matrices

Open
#1,572 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

Wouldn't it make more sense to return `false`? It's not obvious to me that comparing dynamically-sized matrices of different size is necessarily a bug.

_Originally posted by @Ralith in https://github.com/dimforge/nalgebra/issues/1568#issuecomment-3478437643_

The methods in question that `assert!(self.shape() == other.shape())`:
```rs
Matrix::relative_eq()
Matrix::eq()
Matrix::abs_diff_eq()
Matrix::ulps_eq()
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.