Skip to content

Commit a241240

Browse files
committed
FIX: Simplify .is_square() slightly
1 parent c7ae4eb commit a241240

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/impl_2d.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ where
118118
/// assert!(!array.is_square());
119119
/// ```
120120
pub fn is_square(&self) -> bool {
121-
self.nrows() == self.ncols()
121+
let (m, n) = self.dim();
122+
m == n
122123
}
123124
}

0 commit comments

Comments
 (0)