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

Function log1p

src/memory/processing/transformation/mod.rs:37–148  ·  view source on GitHub ↗
(matrix: &IMArrayElement)

Source from the content-addressed store, hash-verified

35}
36
37fn log1p(matrix: &IMArrayElement) -> anyhow::Result<()> {
38 let mut write_guard = matrix.0.write_inner();
39 let data = write_guard.deref_mut();
40 match data {
41 anndata::ArrayData::Array(dyn_array) => match dyn_array {
42 anndata::data::DynArray::I8(_) => {
43 bail!("Array - Normalization it not implemented for type <I8>!")
44 }
45 anndata::data::DynArray::I16(_) => {
46 bail!("Array - Normalization it not implemented for type <I16>!")
47 }
48 anndata::data::DynArray::I32(_) => {
49 bail!("Array - Normalization it not implemented for type <I32>!")
50 }
51 anndata::data::DynArray::I64(_) => {
52 bail!("Array - Normalization it not implemented for type <I64>!")
53 }
54 anndata::data::DynArray::U8(_) => {
55 bail!("Array - Normalization it not implemented for type <U8>!")
56 }
57 anndata::data::DynArray::U16(_) => {
58 bail!("Array - Normalization it not implemented for type <U16>!")
59 }
60 anndata::data::DynArray::U32(_) => {
61 bail!("Array - Normalization it not implemented for type <U32>!")
62 }
63 anndata::data::DynArray::U64(_) => {
64 bail!("Array - Normalization it not implemented for type <U64>!")
65 }
66 anndata::data::DynArray::F32(_) => todo!("Need to implement here!"),
67 anndata::data::DynArray::F64(_) => todo!("Need to implement here!"),
68 anndata::data::DynArray::Bool(_) => {
69 bail!("Array - Normalization it not implemented for type <bool>!")
70 }
71 anndata::data::DynArray::String(_) => {
72 bail!("Array - Normalization it not implemented for type <bool>!")
73 }
74 },
75 anndata::ArrayData::CsrMatrix(dyn_csr_matrix) => match dyn_csr_matrix {
76 anndata::data::DynCsrMatrix::I8(_) => {
77 bail!("CsrMatrix - Normalization it not implemented for type <I8>!")
78 }
79 anndata::data::DynCsrMatrix::I16(_) => {
80 bail!("CsrMatrix - Normalization it not implemented for type <I16>!")
81 }
82 anndata::data::DynCsrMatrix::I32(_) => {
83 bail!("CsrMatrix - Normalization it not implemented for type <I32>!")
84 }
85 anndata::data::DynCsrMatrix::I64(_) => {
86 bail!("CsrMatrix - Normalization it not implemented for type <I64>!")
87 }
88 anndata::data::DynCsrMatrix::U8(_) => {
89 bail!("CsrMatrix - Normalization it not implemented for type <U8>!")
90 }
91 anndata::data::DynCsrMatrix::U16(_) => {
92 bail!("CsrMatrix - Normalization it not implemented for type <U16>!")
93 }
94 anndata::data::DynCsrMatrix::U32(_) => {

Callers 1

log1p_expressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected