Skip to content

Commit

Permalink
Fix bug when exporting scalar text (#652)
Browse files Browse the repository at this point in the history
* Add unittest for this bug

* Update mapData2H5.m

* Update read_indexed_column.m

* Fix broken test

* add test-requirement

* Update unittest

* Remove test

* Remove utility method

---------

Co-authored-by: Ben Dichter <[email protected]>
  • Loading branch information
ehennestad and bendichter authored Feb 11, 2025
1 parent 065dbf8 commit 71e89f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion +io/mapData2H5.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
unlimited_size = H5ML.get_constant_value('H5S_UNLIMITED');
%determine space size
if ischar(data)
if ~forceArray && size(data,1) == 1
if ~forceArray && (size(data,1) == 1 || isempty(data))
sid = H5S.create('H5S_SCALAR');
else
dims = size(data, 1);
Expand Down

0 comments on commit 71e89f1

Please sign in to comment.