Skip to content

Extract a String from a HDF5 using mdf5-metno #95

@hai-nguyen-van

Description

@hai-nguyen-van

Hello,

I've been trying to use hdf5-metno to extract data from a V7.3 .mat file. I successfully extracted data f64 arranged in 2D and 3D matrices/tensors. However, I have an association (X2, MY_STRING) where MY_STRING is a string in MATLAB.

MAIN
|_ X1
|_ X2
   |_ MY_STRING

I fail to extract MY_STRING the right way in Rust. I tried the following:

let v0 = file.group("MAIN").unwrap().dataset("X2")?.read::<VarLenAscii>()?;

I get the error:

v0.as_ref() = Err(
    no conversion paths found,
)

Interestingly, the dimension is 2 🤔

v0.ndim() = 2

Did I do something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions