Changed use of Dataset.get_matrix() to Dataset.asarray() and removed it.
This commit is contained in:
parent
97f56f66ac
commit
0db25f1dd7
|
@ -160,10 +160,6 @@ class Dataset:
|
|||
"""Returns dataset name"""
|
||||
return self._name
|
||||
|
||||
def get_matrix(self):
|
||||
"""Returns internal numeric matrix for dataset."""
|
||||
return self._array
|
||||
|
||||
def get_all_dims(self):
|
||||
"""Returns all dimensions in project"""
|
||||
return self._all_dims
|
||||
|
|
|
@ -386,7 +386,7 @@ class LinePlot(Plot):
|
|||
import rpy
|
||||
silent_eval = rpy.with_mode(rpy.NO_CONVERSION, rpy.r)
|
||||
|
||||
rpy.with_mode(rpy.NO_CONVERSION, rpy.r.assign)("m", dataset.get_matrix())
|
||||
rpy.with_mode(rpy.NO_CONVERSION, rpy.r.assign)("m", dataset.asarray())
|
||||
ymin, ymax = rpy.r("range(m)*1.1")
|
||||
self._ymin, self._ymax = ymin, ymax
|
||||
silent_eval("res <- apply(m, 2, density, from=%s, to=%s)" % (ymin, ymax))
|
||||
|
@ -420,7 +420,7 @@ class LinePlot(Plot):
|
|||
ids = selection[dim_2] # current identifiers
|
||||
index = [ind for id,ind in self._dataset[dim_2].items() if id in ids] #conversion to index
|
||||
for i in index:
|
||||
line = self._dataset.get_matrix()[i]
|
||||
line = self._dataset.asarray()[i]
|
||||
self.ax.plot(range(1, len(line)+1), line)
|
||||
|
||||
self.ax.set_xlim((0.5, cols+0.5))
|
||||
|
|
|
@ -203,7 +203,7 @@ class PCAFunction(workflow.Function):
|
|||
dim_2, dim_1 = data.get_dim_names()
|
||||
|
||||
silent_eval = rpy.with_mode(rpy.NO_CONVERSION, rpy.r)
|
||||
rpy.with_mode(rpy.NO_CONVERSION, rpy.r.assign)("m", data.get_matrix())
|
||||
rpy.with_mode(rpy.NO_CONVERSION, rpy.r.assign)("m", data.asarray())
|
||||
silent_eval("t = prcomp(t(m))")
|
||||
|
||||
# we make a unique name for component dimension
|
||||
|
|
|
@ -236,7 +236,7 @@ class PCAFunction(workflow.Function):
|
|||
|
||||
|
||||
silent_eval = rpy.with_mode(rpy.NO_CONVERSION, rpy.r)
|
||||
rpy.with_mode(rpy.NO_CONVERSION, rpy.r.assign)("m", data.get_matrix())
|
||||
rpy.with_mode(rpy.NO_CONVERSION, rpy.r.assign)("m", data.asarray())
|
||||
silent_eval("t = prcomp(t(m))")
|
||||
|
||||
T_ids = map(str, range(1, rpy.r("dim(t$x)")[1]+1))
|
||||
|
|
Reference in New Issue