Skip to content

Read support for MAT-file v4 - #61

Merged
foreverallama merged 17 commits into
mainfrom
matv4
May 17, 2026
Merged

foreverallama merged 17 commits into
mainfrom
matv4

Conversation

@foreverallama

Copy link
Copy Markdown
Owner
  • Added Read Support for MAT-file v4
  • Change return type of whosmat from list(var_name, shape, classname) to dict{var_name: (shape, classname)}
  • Misc: Refactor tests to include v4 format
  • Misc: Update README

Some notes:

  • No support for VAX-D, VAX-G and CRAY floating point formats. Do not plan to support unless requested.
  • Will not support write operations to v4 format.
  • Classnames returned by whosmat now mostly reflects MATLAB classnames displayed in the workspace (except for sparse, which is only returned as "sparse")

Fixes #60

@foreverallama

Copy link
Copy Markdown
Owner Author

Just documenting a MATLAB bug I found when working on this:

If I save a 0x0 complex double in v7.3, it loads back as a real variable. That's because MATLAB does not use any identifiers for complex data in v7.3 format, it's defined by the type of HDF5 dataset. However, since there is no data in a 0x0 array (the data is the shape of the empty variable), it loses the identifier for complex type.

@foreverallama
foreverallama merged commit 63ad9ba into main May 17, 2026
3 checks passed
@foreverallama
foreverallama deleted the matv4 branch May 17, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] RW support for MAT-file v4

1 participant