Skip to content
Open
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
7 changes: 6 additions & 1 deletion openmatrix/File.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ def list_matrices(self):
matrices : list
List of all matrix names stored in this OMX file.
"""
return [node.name for node in self.list_nodes(self.root.data,'CArray')]
matrices = []
if 'data' in self.root:
for node in self.list_nodes(self.root.data):
if isinstance(node, tables.Array) and len(node.shape) == 2:
matrices.append(node.name)
return matrices


def list_all_attributes(self):
Expand Down