@@ -1772,7 +1772,7 @@ where
1772
1772
///
1773
1773
/// Return `ShapeError` if their shapes can not be broadcast together.
1774
1774
pub ( crate ) fn broadcast_with < ' a , ' b , B , S2 , E > ( & ' a self , other : & ' b ArrayBase < S2 , E > ) ->
1775
- Result < ( ArrayView < ' a , A , < D as DimMax < E > >:: Output > , ArrayView < ' b , B , < D as DimMax < E > > :: Output > ) , ShapeError >
1775
+ Result < ( ArrayView < ' a , A , DimMaxOf < D , E > > , ArrayView < ' b , B , DimMaxOf < D , E > > ) , ShapeError >
1776
1776
where
1777
1777
S : Data < Elem =A > ,
1778
1778
S2 : Data < Elem =B > ,
@@ -1782,10 +1782,10 @@ where
1782
1782
let shape = co_broadcast :: < D , E , <D as DimMax < E > >:: Output > ( & self . dim , & other. dim ) ?;
1783
1783
if let Some ( view1) = self . broadcast ( shape. clone ( ) ) {
1784
1784
if let Some ( view2) = other. broadcast ( shape) {
1785
- return Ok ( ( view1, view2) )
1785
+ return Ok ( ( view1, view2) ) ;
1786
1786
}
1787
1787
}
1788
- return Err ( from_kind ( ErrorKind :: IncompatibleShape ) ) ;
1788
+ Err ( from_kind ( ErrorKind :: IncompatibleShape ) )
1789
1789
}
1790
1790
1791
1791
/// Swap axes `ax` and `bx`.
@@ -2465,3 +2465,5 @@ unsafe fn unlimited_transmute<A, B>(data: A) -> B {
2465
2465
let old_data = ManuallyDrop :: new ( data) ;
2466
2466
( & * old_data as * const A as * const B ) . read ( )
2467
2467
}
2468
+
2469
+ type DimMaxOf < A , B > = <A as DimMax < B > >:: Output ;
0 commit comments