fa926b8278a3b635d929e0fe6c63ac2a8983a406,lib/prody/dynamics/nma.py,NMA,__getitem__,#NMA#Any#,58
Before Change
if self._n_modes == 0:
raise ValueError("{0} modes are not calculated, try "
"calcModes() method".format(str(self)))
indices = self._indices
if indices is None:
self._indices = indices = np.arange(self._n_modes)
try:
indices = indices[index]
except IndexError as err:
raise IndexError(str(err))
try:
length = len(indices)
except TypeError:
return Mode(self, indices)
After Change
if isinstance(index, int):
return self._getMode(index)
elif isinstance(index, slice):
indices = np.arange(*index.indices(len(self)))
if len(indices) > 0:
return ModeSet(self, indices)
elif isinstance(index, (list, tuple)):
for i in index:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: prody/ProDy
Commit Name: fa926b8278a3b635d929e0fe6c63ac2a8983a406
Time: 2012-12-15
Author: lordnapi@gmail.com
File Name: lib/prody/dynamics/nma.py
Class Name: NMA
Method Name: __getitem__
Project Name: CellProfiler/CellProfiler
Commit Name: 9303d06331cf6895188591e623cbbca76ea27c3d
Time: 2011-07-12
Author: thouis@1fc53939-2000-0410-845c-e8453a809027
File Name: cellprofiler/objects.py
Class Name: Objects
Method Name: relate_children
Project Name: merenlab/anvio
Commit Name: 1c43f73cd1cea723b1fd4a479fa26087016e8c99
Time: 2020-02-26
Author: kiefl.evan@gmail.com
File Name: anvio/contigops.py
Class Name: Auxiliary
Method Name: run_SCVs