From bf570e7d7fc1b57b5be190ca4069c31666254f95 Mon Sep 17 00:00:00 2001 From: John Detlefs Date: Tue, 19 Jul 2016 10:58:55 -0700 Subject: [PATCH] Fixed docs, returned self --- package/MDAnalysis/analysis/diffusionmap.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/package/MDAnalysis/analysis/diffusionmap.py b/package/MDAnalysis/analysis/diffusionmap.py index cc13cbd9a90..d515292b30c 100644 --- a/package/MDAnalysis/analysis/diffusionmap.py +++ b/package/MDAnalysis/analysis/diffusionmap.py @@ -51,7 +51,6 @@ First load all modules and test data :: >>> import MDAnalysis as mda - >>> import numpy as np >>> import MDAnalysis.analysis.diffusionmap as diffusionmap >>> from MDAnalysis.tests.datafiles import PSF, DCD @@ -112,7 +111,6 @@ :mod:`~MDAnalysis.analysis.diffusionmap` and can be passed as an initialization argument for :class:`DiffusionMap`. >>> import MDAnalysis as mda - >>> import numpy as np >>> import MDAnalysis.analysis.diffusionmap as diffusionmap >>> from MDAnalysis.tests.datafiles import PSF, DCD @@ -191,7 +189,7 @@ class DistanceMatrix(AnalysisBase): ---------- atoms : AtomGroup Selected atoms in trajectory subject to dimension reduction - dist_matrix : array + dist_matrix : array, (n_frames, n_frames) Array of all possible ij metric distances between frames in trajectory. This matrix is symmetric with zeros on the diagonal. @@ -280,7 +278,7 @@ class DiffusionMap(object): Attributes ---------- - eigenvalues: array () + eigenvalues: array (n_frames,) Eigenvalues of the diffusion map Methods @@ -343,11 +341,12 @@ def run(self): self.eigenvalues = self._eigenvals[sort_idx] self._eigenvectors = self._eigenvectors[sort_idx] self._calculated = True + return self def transform(self, n_eigenvectors, time): """ Embeds a trajectory via the diffusion map - Parameter + Parameters --------- n_eigenvectors : int The number of dominant eigenvectors to be used for