You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attribute syntax table.col_name currently returns the VectorData instead of the VectorIndex for a ragged array. It should return the same VectorIndex as in table[col_name] and table.get(col_name). All three methods should return the same result. Otherwise this is confusing. See also NeurodataWithoutBorders/pynwb#1990
@oruebel, @stephprince, and I discussed this today. We agree that the current methods are inconsistent and should be addressed. The plan is to make a breaking change for HDMF 5.0 (not the one this week):
Change the dot accessor to return the VectorIndex to be consistent with the other two methods of accessing the column.
Remove the VectorIndex columns from being accessible through these three methods. It's confusing to have dt.col1 and dt.col1_index return the same thing. These methods should only return the high-level columns after ragged/index processing.
Users still need an easy way to get the raw columns. Add a new attribute on the table that is a dictionary that maps the name of the column to the column, whether it is a VectorData or VectorIndex.
What happened?
The attribute syntax
table.col_name
currently returns theVectorData
instead of theVectorIndex
for a ragged array. It should return the sameVectorIndex
as intable[col_name]
andtable.get(col_name)
. All three methods should return the same result. Otherwise this is confusing. See also NeurodataWithoutBorders/pynwb#1990Steps to Reproduce
Traceback
No response
Operating System
macOS
Python Executable
Conda
Python Version
3.12
Package Versions
No response
The text was updated successfully, but these errors were encountered: