#NEWLINE# def _get_group_trajectories( self , group_name , sids ) : #NEWLINE# #INDENT# 'Compute the trajectory results for `group_name` containing the\n        samples `sids`.\n\n        Weights the data if `self._weighted` is True and ``len(sids) > 1``\n\n        Parameters\n        ----------\n        group_name : str\n            The name of the group\n        sids : list of str\n            The sample ids in the group\n\n        Returns\n        -------\n        GroupResults\n            The trajectory results for the given group\n\n        Raises\n        ------\n        RuntimeError\n            If sids is an empty list\n        ' #NEWLINE# trajectories = ( sids . _coords . ix [ sids ] * self . _prop_expl ) #NEWLINE# if trajectories . empty : #NEWLINE# #INDENT# raise RuntimeError ( 'No samples to process, an empty list cannot be processed' ) #NEWLINE# #UNINDENT# if ( self . _weighted and ( len ( sids ) > 1 ) ) : #NEWLINE# #INDENT# trajectories_copy = deepcopy ( trajectories ) #NEWLINE# try : #NEWLINE# #INDENT# trajectories = _weight_by_vector ( trajectories_copy , self . _weighting_vector [ sids ] ) #NEWLINE# #UNINDENT# except ( FloatingPointError , ValueError ) : #NEWLINE# #INDENT# self . _message_buffer . append ( 'Could not weight group, no gradient in the the weighting vector.\n' ) #NEWLINE# trajectories = trajectories_copy #NEWLINE# #UNINDENT# #UNINDENT# return self . _compute_trajectories_results ( group_name , trajectories . ix [ sids ] )