Skip to content

Commit ba02a46

Browse files
committed
fix array comparison
1 parent 91cff90 commit ba02a46

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ impl<T: ArrayValue + ArrayCmp<U>, U: ArrayValue> PartialOrd<Array<U>> for Array<
301301
.zip(&other.data)
302302
.map(|(a, b)| a.array_cmp(b))
303303
.find(|o| o != &Ordering::Equal)
304-
.unwrap_or_else(|| self.data.len().cmp(&other.data.len()));
304+
.unwrap_or_else(|| self.shape.cmp(&other.shape));
305305
Some(cmp)
306306
}
307307
}

tests/units.ua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ ParseOrZero ← ⍣parse⋅⋅0
149149
⍤⊃⋅∘≍ ⊃∘⍜(☇¯2)∘ ↯2_3_4⇡24
150150
⍤⊃⋅∘≍ ⊃∘⍜(☇¯3)∘ ↯2_3_4⇡24
151151
⍤⊃⋅∘≍ □↯2_3_4⇡24 ⍜(☇3)□ ↯2_3_4⇡24
152-
⍤⊃⋅∘≍ □↯1_¯1_4⇡24 ⍜(☇1)□ ↯2_3_4⇡24
152+
⍤⊃⋅∘≍ □↯2_¯1_4⇡24 ⍜(☇1)□ ↯2_3_4⇡24
153153
⍤⊃⋅∘≍ ↯2_3≡□↯¯1_4⇡24 ⍜(☇1)≡□ ↯2_3_4⇡24
154154
⍤⊃⋅∘≍ ≡□↯2_3_4⇡24 ⍜(☇2)≡□ ↯2_3_4⇡24
155155

0 commit comments

Comments
 (0)