6
6
// option. This file may not be copied, modified, or distributed
7
7
// except according to those terms.
8
8
9
- use crate :: dimension:: BroadcastShape ;
9
+ use crate :: dimension:: DimMax ;
10
10
use crate :: Zip ;
11
11
use num_complex:: Complex ;
12
12
@@ -68,10 +68,10 @@ where
68
68
B : Clone ,
69
69
S : DataOwned <Elem =A > + DataMut ,
70
70
S2 : Data <Elem =B >,
71
- D : Dimension + BroadcastShape <E >,
71
+ D : Dimension + DimMax <E >,
72
72
E : Dimension ,
73
73
{
74
- type Output = ArrayBase <S , <D as BroadcastShape <E >>:: Output >;
74
+ type Output = ArrayBase <S , <D as DimMax <E >>:: Output >;
75
75
fn $mth( self , rhs: ArrayBase <S2 , E >) -> Self :: Output
76
76
{
77
77
self . $mth( & rhs)
@@ -95,14 +95,14 @@ where
95
95
B : Clone ,
96
96
S : DataOwned <Elem =A > + DataMut ,
97
97
S2 : Data <Elem =B >,
98
- D : Dimension + BroadcastShape <E >,
98
+ D : Dimension + DimMax <E >,
99
99
E : Dimension ,
100
100
{
101
- type Output = ArrayBase <S , <D as BroadcastShape <E >>:: Output >;
101
+ type Output = ArrayBase <S , <D as DimMax <E >>:: Output >;
102
102
fn $mth( self , rhs: & ArrayBase <S2 , E >) -> Self :: Output
103
103
{
104
104
if self . ndim( ) == rhs. ndim( ) && self . shape( ) == rhs. shape( ) {
105
- let mut out = self . into_dimensionality:: <<D as BroadcastShape <E >>:: Output >( ) . unwrap( ) ;
105
+ let mut out = self . into_dimensionality:: <<D as DimMax <E >>:: Output >( ) . unwrap( ) ;
106
106
out. zip_mut_with_same_shape( rhs, clone_iopf( A :: $mth) ) ;
107
107
out
108
108
} else {
@@ -130,14 +130,14 @@ where
130
130
S : Data <Elem =A >,
131
131
S2 : DataOwned <Elem =B > + DataMut ,
132
132
D : Dimension ,
133
- E : Dimension + BroadcastShape <D >,
133
+ E : Dimension + DimMax <D >,
134
134
{
135
- type Output = ArrayBase <S2 , <E as BroadcastShape <D >>:: Output >;
135
+ type Output = ArrayBase <S2 , <E as DimMax <D >>:: Output >;
136
136
fn $mth( self , rhs: ArrayBase <S2 , E >) -> Self :: Output
137
137
where
138
138
{
139
139
if self . ndim( ) == rhs. ndim( ) && self . shape( ) == rhs. shape( ) {
140
- let mut out = rhs. into_dimensionality:: <<E as BroadcastShape <D >>:: Output >( ) . unwrap( ) ;
140
+ let mut out = rhs. into_dimensionality:: <<E as DimMax <D >>:: Output >( ) . unwrap( ) ;
141
141
out. zip_mut_with_same_shape( self , clone_iopf_rev( A :: $mth) ) ;
142
142
out
143
143
} else {
@@ -162,10 +162,10 @@ where
162
162
B : Clone ,
163
163
S : Data <Elem =A >,
164
164
S2 : Data <Elem =B >,
165
- D : Dimension + BroadcastShape <E >,
165
+ D : Dimension + DimMax <E >,
166
166
E : Dimension ,
167
167
{
168
- type Output = Array <A , <D as BroadcastShape <E >>:: Output >;
168
+ type Output = Array <A , <D as DimMax <E >>:: Output >;
169
169
fn $mth( self , rhs: & ' a ArrayBase <S2 , E >) -> Self :: Output {
170
170
let ( lhs, rhs) = self . broadcast_with( rhs) . unwrap( ) ;
171
171
Zip :: from( & lhs) . and( & rhs) . map_collect( clone_opf( A :: $mth) )
0 commit comments