Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions +tests/+unit/PynwbTutorialTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
properties (Constant)
% SkippedTutorials - Tutorials from pynwb to skip
SkippedTutorials = {...
'plot_read_basics.py', ... % Downloads file from dandi archive, does not export nwb file
'streaming.py', ... % Requires that HDF5 library is installed with the ROS3 driver enabled which is not a given
'object_id.py', ... % Does not export nwb file
'plot_configurator.py', ... % Does not export nwb file
Expand All @@ -31,7 +32,7 @@
SkippedFiles = {'family_nwb_file_0.nwb'} % requires family driver from h5py

% PythonDependencies - Package dependencies for running pynwb tutorials
PythonDependencies = {'hdmf-zarr', 'dataframe-image', 'matplotlib', 'dandi'}
PythonDependencies = {'hdmf-zarr', 'dataframe-image', 'matplotlib'}
end

properties (Access = private)
Expand Down Expand Up @@ -101,7 +102,7 @@ function testTutorial(testCase, tutorialFile)

pythonPath = tests.util.getPythonPath();

cmd = sprintf('"%s" %s', pythonPath, tutorialFile );
cmd = sprintf('%s %s', pythonPath, tutorialFile);
[status, cmdout] = system(cmd);

if status == 1
Expand Down
14 changes: 13 additions & 1 deletion +types/+untyped/@DataStub/load_mat_style.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@
end

points = cell(length(dataDimensions), 1);

if isscalar(dataDimensions)
% Starting in MATLAB R2024b, the input argument for the size
% of an array in ind2sub must be a vector of positive integers
% with two or more elements. This fix replicates the behavior of
% older MATLAB versions, where it was assumed that the a scalar
% size referred to the row dimension. For scalar dimensions
% (i.e., row or column vectors), we can still assume this
% to be true in matnwb.
dataDimensions = [dataDimensions, 1];
end

Comment on lines +49 to +60
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you are saying, yes this is a simpler solution! Good observation

[points{:}] = ind2sub(dataDimensions, orderedSelection);
readSpaceId = H5S.copy(spaceId);
H5S.select_none(readSpaceId);
Expand Down Expand Up @@ -187,4 +199,4 @@
indexKeyIndex(indexKeyIndexNextIndex) = indexKeyIndex(indexKeyIndexNextIndex) + 1;
indexKeyIndex((indexKeyIndexNextIndex+1):end) = 1;
end
end
end