* system/plots.py: Added NetworkPlot, which may or may not work correctly.
* system/dataset.py: Removed a few lines of obsolete code.
This commit is contained in:
@@ -113,10 +113,7 @@ class Dataset:
|
||||
|
||||
def asarray(self):
|
||||
"""Returns the numeric array (data) of dataset"""
|
||||
if not self.has_array:
|
||||
raise ValueError, "Dataset is empty"
|
||||
else:
|
||||
return self._array
|
||||
return self._array
|
||||
|
||||
def add_array(self,array):
|
||||
"""Adds array as an ArrayType object.
|
||||
@@ -199,14 +196,7 @@ class CategoryDataset(Dataset):
|
||||
|
||||
def __init__(self):
|
||||
Dataset.__init__(self)
|
||||
self.has_collection = False
|
||||
|
||||
def as_array(self):
|
||||
"""Returns data as binary matrix"""
|
||||
if not self.has_array and self.has_collection:
|
||||
#build numeric array
|
||||
pass
|
||||
|
||||
def as_collection(self,dim):
|
||||
"""Returns data as collection along dim"""
|
||||
pass
|
||||
@@ -236,7 +226,7 @@ class GraphDataset(Dataset):
|
||||
self.has_graph = False
|
||||
|
||||
def asnetworkx(self,nx_type='graph'):
|
||||
dim = self.get_dim_names()[0]
|
||||
dim = self.get_dim_name()[0]
|
||||
ids = self.get_identifiers(dim)
|
||||
adj_mat = self.asarray()
|
||||
G = self._graph_from_adj_matrix(adj_mat,labels=ids)
|
||||
@@ -270,6 +260,7 @@ class GraphDataset(Dataset):
|
||||
tail = labels[i]
|
||||
G.add_edge(head,tail)
|
||||
return G
|
||||
|
||||
Dataset._all_dims=set()
|
||||
|
||||
class Selection:
|
||||
|
Reference in New Issue
Block a user