File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -205,17 +205,17 @@ impl<A: MFloat> Matrix for RcArray<A, Ix2> {
205
205
self . to_owned ( ) . norm_f ( )
206
206
}
207
207
fn svd ( self ) -> Result < ( Self , Self :: Vector , Self ) , LinalgError > {
208
- // XXX unnecessary clone
208
+ // XXX unnecessary clone (should use into_owned())
209
209
let ( u, s, v) = self . to_owned ( ) . svd ( ) ?;
210
210
Ok ( ( u. into_shared ( ) , s. into_shared ( ) , v. into_shared ( ) ) )
211
211
}
212
212
fn qr ( self ) -> Result < ( Self , Self ) , LinalgError > {
213
- // XXX unnecessary clone
213
+ // XXX unnecessary clone (should use into_owned())
214
214
let ( q, r) = self . to_owned ( ) . qr ( ) ?;
215
215
Ok ( ( q. into_shared ( ) , r. into_shared ( ) ) )
216
216
}
217
217
fn lu ( self ) -> Result < ( Self :: Permutator , Self , Self ) , LinalgError > {
218
- // XXX unnecessary clone
218
+ // XXX unnecessary clone (should use into_owned())
219
219
let ( p, l, u) = self . to_owned ( ) . lu ( ) ?;
220
220
Ok ( ( p, l. into_shared ( ) , u. into_shared ( ) ) )
221
221
}
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ impl<A: MFloat> SquareMatrix for Array<A, Ix2> {
60
60
61
61
impl < A : MFloat > SquareMatrix for RcArray < A , Ix2 > {
62
62
fn inv ( self ) -> Result < Self , LinalgError > {
63
- // XXX unnecessary clone
63
+ // XXX unnecessary clone (should use into_owned())
64
64
let i = self . to_owned ( ) . inv ( ) ?;
65
65
Ok ( i. into_shared ( ) )
66
66
}
You can’t perform that action at this time.
0 commit comments