pub fn serialize_array2<S>(
array: &Array2<f64>,
serializer: S,
) -> Result<S::Ok, S::Error>where
S: Serializer,
Expand description
Serialize a 2D array to a format compatible with serde
The serialization format stores the shape information (rows, cols) at the beginning of a flat vector, followed by the array data in row-major order.
§Arguments
array
- The 2D array to serializeserializer
- The serde serializer to use
§Returns
Result<S::Ok, S::Error>
- Serialization result