(
csc: &CscMatrix<T>,
shape: Shape,
)
| 333 | } |
| 334 | |
| 335 | fn convert_to_array_f64_csc<T: NumericOps>( |
| 336 | csc: &CscMatrix<T>, |
| 337 | shape: Shape, |
| 338 | ) -> anyhow::Result<Array2<f64>> { |
| 339 | let mut dense = Array2::<f64>::zeros((shape[0], shape[1])); |
| 340 | for (col, vec) in csc.col_iter().enumerate() { |
| 341 | for (&row, val) in vec.row_indices().iter().zip(csc.values()) { |
| 342 | dense[[row, col]] = NumCast::from(*val).unwrap(); |
| 343 | } |
| 344 | } |
| 345 | Ok(dense) |
| 346 | } |
| 347 | |
| 348 | fn convert_to_array_f64_csr<T: NumericOps>( |
| 349 | csr: &CsrMatrix<T>, |
nothing calls this directly
no outgoing calls
no test coverage detected