-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated getRow function to slice through last dimension of multidimensional columns #378
updated getRow function to slice through last dimension of multidimensional columns #378
Conversation
…sional matrix; works with simple DynamicTable
with initial commit, getRow method works with simple DynamicTable objects sample snippet col1 = types.hdmf_common.VectorData( ...
'description', 'column #1', ...
'data', (1:10)' ...
);
col2 = types.hdmf_common.VectorData( ...
'description', 'column #2', ...
'data', rand(5,2,10) ...
);
my_table = types.hdmf_common.DynamicTable( ...
'description','an example table', ...
'colnames', {'col1','col2'}, ...
'col1',col1, ...
'col2',col2, ...
'id', types.hdmf_common.ElementIdentifiers('data', (0:9)') ...
);
>> my_table.getRow(1:3)
ans =
3×2 table
col1 col2
____ ______________
1 [1×5×2 double]
2 [1×5×2 double]
3 [1×5×2 double] |
Could we make the rows 5x2 instead of 1x5x2? |
it's not immediately clear how to do that. That output is handled under the hood by MATLAB after running the following line subTable = table(row{:}, 'VariableNames', columns); with the following variable values K>> row
row =
1×2 cell array
{3×1 double} {3×5×2 double}
K>> columns
columns =
1×2 cell array
{'col1'} {'col2'} |
Codecov Report
@@ Coverage Diff @@
## master #378 +/- ##
==========================================
+ Coverage 84.91% 85.06% +0.14%
==========================================
Files 124 124
Lines 4495 4539 +44
==========================================
+ Hits 3817 3861 +44
Misses 678 678
Continue to review full report at Codecov.
|
@ln-vidrio @bendichter Let me know if you have any thoughts on this PR. |
fixes #377