MCPcopy Create free account
hub / github.com/SingleRust/SingleRust / convert_to_array_f64_selected

Function convert_to_array_f64_selected

src/shared/mod.rs:431–454  ·  view source on GitHub ↗
(
    data: &ArrayData,
    shape: Shape,
    row_selection: &SelectInfoElem,
    col_selection: &SelectInfoElem,
)

Source from the content-addressed store, hash-verified

429}
430
431pub fn convert_to_array_f64_selected(
432 data: &ArrayData,
433 shape: Shape,
434 row_selection: &SelectInfoElem,
435 col_selection: &SelectInfoElem,
436) -> anyhow::Result<Array2<f64>> {
437 match data {
438 ArrayData::CscMatrix(csc) => match_dyn_csc_matrix!(
439 csc,
440 convert_to_array_f64_csc_selected,
441 shape,
442 row_selection,
443 col_selection
444 ),
445 ArrayData::CsrMatrix(csr) => match_dyn_csr_matrix!(
446 csr,
447 convert_to_array_f64_csr_selected,
448 shape,
449 row_selection,
450 col_selection
451 ),
452 _ => anyhow::bail!("Unsupported data type for conversion to Array2<f64>"),
453 }
454}
455
456pub fn need_conversion_target_float_type(scalar_type: &ScalarType) -> anyhow::Result<bool> {
457 match scalar_type {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected