bugGNU Octave - Bugs: bug #64191, Octave can't read compound data...

 
 

bug #64191: Octave can't read compound data type from hdf5 file using load command

Submitter:  Nicklas SB Karlsson <karlnick>
Submitted:  Sun 14 May 2023 05:35:49 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Nicklas SB Karlsson Open/Closed:  * Open
Release:  * 6.2.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 15 May 2023 10:49:21 AM UTC, comment #1: 

Octave currently doesn't handle hdf5 files that are not formatted according to its own binary format.

I am in the process of writing a package to handle reading and writing hdf5 files from Octave. This is clearly WIP but, e.g. compound data types are already handled.

I attached an archive of the package which you can install using


pkg install oct-hdf5.tar.gz


Then you can load compound data using the low level interface, e.g.


example_file = file_in_loadpath ("base_types_mat73.mat");
file_id = H5F.open (example_file);
dataset_id = H5D.open (file_id, "cplx_scalar_single", "H5P_DEFAULT");
data = H5D.read (dataset_id);
H5D.close (dataset_id);
H5F.close (file_id)


As in Matlab, for compound data types, data are returned as a struct with fields corresponding to type element names.

You are very welcome to provide help in the implementation of the package.

(file #54742)

Pantxo Diribarne <pantxo>
Group Member
Sun 14 May 2023 05:35:49 PM UTC, original submission:  

Have time to help with the implementation if needed. Or maybe even have time implement myself and do a pull request.

Nicklas SB Karlsson <karlnick>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #54742:  oct-hdf5.tar.gz added by pantxo (380KiB - application/gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by karlnick (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-05-15 pantxo Attached File- Added oct-hdf5.tar.gz, #54742

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code