diff --git a/openmatrix/File.py b/openmatrix/File.py index c7eb328..d112e36 100644 --- a/openmatrix/File.py +++ b/openmatrix/File.py @@ -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):