list of :py:class:`~beyond.orbits.man.Maneuver`: Maneuver descriptions usable by the
        propagator. Not all propagators can handle maneuvers. Check their respective documentations
        for more details.
969114
def maneuvers(self):
        
        mans = self.complements.setdefault('maneuvers', [])

        if isinstance(mans, Maneuver):
            mans = [mans]
            self.complements['maneuvers'] = mans

        return mans
900412
def capture_moves(self, position):
        
        try:
            right_diagonal = self.square_in_front(self.location.shift_right())
            for move in self._one_diagonal_capture_square(right_diagonal, position):
                yield move
        except IndexError:
            pass

        try:
            left_diagonal = self.square_in_front(self.location.shift_left())
            for move in self._one_diagonal_capture_square(left_diagonal, position):
                yield move
        except IndexError:
            pass
194440
def forward(self, observations, input_actions=None):
        
        observations = self.input_block(observations)

        if input_actions is not None:
            actions = input_actions

            value_input = torch.cat([observations, actions], dim=1)
            value_hidden = self.value_backbone(value_input)

            values = self.critic_head(value_hidden)
        else:
            policy_hidden = self.policy_backbone(observations)
            actions = self.action_head(policy_hidden)

            value_input = torch.cat([observations, actions], dim=1)
            value_hidden = self.value_backbone(value_input)

            values = self.critic_head(value_hidden)

        return actions, values
489619
def _get_handled_methods(self, actions_map):
        
        methods = ('OPTIONS',)

        defined_actions = []
        for action_name in actions_map.keys():
            view_method = getattr(self, action_name, None)
            method_exists = view_method is not None
            method_defined = view_method != self.not_allowed_action
            if method_exists and method_defined:
                defined_actions.append(action_name)

        for action in defined_actions:
            methods += actions_map[action]

        return methods
386242
def move_forward(self):
        """"""
        self.at(ardrone.at.pcmd, True, 0, -self.speed, 0, 0)
1217736
def with_actions(actions_or_group_name, actions=None):
    
    group = None
    if isinstance(actions_or_group_name, str):
        group = actions_or_group_name
    else:
        actions = actions_or_group_name
    def decorator(f):
        if isinstance(f, WithActionsDecorator):
            dec = f
        else:
            dec = WithActionsDecorator(f)
        dec.actions.extend(load_actions(actions, group=group))
        return dec
    return decorator
1344455
def labeled_mechanisms(self):
        """"""
        label = self.subsystem.node_labels.indices2labels
        return tuple(list(label(mechanism)) for mechanism in self.mechanisms)
952973
def possible_moves(self, position):
        
        # Chain used to combine multiple generators
        for move in itertools.chain(*[self.add(fn, position) for fn in self.cardinal_directions]):
            yield move

        for move in self.add_castle(position):
            yield move
1357836
def all_possible_moves(self, input_color):
        
        position_tuple = self.position_tuple
        if position_tuple not in self.possible_moves:
            self.possible_moves[position_tuple] = tuple(self._calc_all_possible_moves(input_color))

        return self.possible_moves[position_tuple]
493366
def _helioXYZ(self,*args,**kwargs):
        """"""
        obs, ro, vo= self._parse_radec_kwargs(kwargs)
        thiso= self(*args,**kwargs)
        if not len(thiso.shape) == 2: thiso= thiso.reshape((thiso.shape[0],1))
        if len(thiso[:,0]) != 4 and len(thiso[:,0]) != 6: #pragma: no cover
            raise AttributeError("orbit must track azimuth to use radeclbd functions")
        elif len(thiso[:,0]) == 4: #planarOrbit
            if isinstance(obs,(nu.ndarray,list)):
                X,Y,Z = coords.galcencyl_to_XYZ(\
                    thiso[0,:],thiso[3,:]-nu.arctan2(obs[1],obs[0]),0.,
                    Xsun=nu.sqrt(obs[0]**2.+obs[1]**2.)/ro,
                    Zsun=obs[2]/ro,_extra_rot=False).T
            else: #Orbit instance
                obs.turn_physical_off()
                if obs.dim() == 2:
                    X,Y,Z = coords.galcencyl_to_XYZ(\
                        thiso[0,:],thiso[3,:]-obs.phi(*args,**kwargs),
                        nu.zeros_like(thiso[0]),
                        Xsun=obs.R(*args,**kwargs),Zsun=0.,_extra_rot=False).T
                else:
                    X,Y,Z = coords.galcencyl_to_XYZ(\
                        thiso[0,:],thiso[3,:]-obs.phi(*args,**kwargs),
                        nu.zeros_like(thiso[0]),
                        Xsun=obs.R(*args,**kwargs),
                        Zsun=obs.z(*args,**kwargs),_extra_rot=False).T
                obs.turn_physical_on()
        else: #FullOrbit
            if isinstance(obs,(nu.ndarray,list)):
                X,Y,Z = coords.galcencyl_to_XYZ(\
                    thiso[0,:],thiso[5,:]-nu.arctan2(obs[1],obs[0]),
                    thiso[3,:],
                    Xsun=nu.sqrt(obs[0]**2.+obs[1]**2.)/ro,
                    Zsun=obs[2]/ro).T
            else: #Orbit instance
                obs.turn_physical_off()
                if obs.dim() == 2:
                    X,Y,Z = coords.galcencyl_to_XYZ(\
                        thiso[0,:],thiso[5,:]-obs.phi(*args,**kwargs),
                        thiso[3,:],
                        Xsun=obs.R(*args,**kwargs),Zsun=0.).T
                else:
                    X,Y,Z = coords.galcencyl_to_XYZ(\
                        thiso[0,:],thiso[5,:]-obs.phi(*args,**kwargs),
                        thiso[3,:],
                        Xsun=obs.R(*args,**kwargs),
                        Zsun=obs.z(*args,**kwargs)).T
                obs.turn_physical_on()
        return (X*ro,Y*ro,Z*ro)
1231081
def step(self, observation, argmax_sampling=False):
        
        policy_params, q = self(observation)
        actions = self.action_head.sample(policy_params, argmax_sampling=argmax_sampling)

        # log probability - we can do that, because we support only discrete action spaces
        logprobs = self.action_head.logprob(actions, policy_params)

        return {
            'actions': actions,
            'q': q,
            'logprobs': policy_params,
            'action:logprobs': logprobs
        }
83382
def action(callback=None, name=None, path=None, methods=Method.GET, resource=None, tags=None,
           summary=None, middleware=None):
    # type: (Callable, Path, Path, Methods, Type[Resource], Tags, str, List[Any]) -> Operation
    
    # Generate action path
    path = path or '{key_field}'
    if name:
        path += name

    def inner(c):
        return Operation(c, path, methods, resource, tags, summary, middleware)
    return inner(callback) if callback else inner
1262714
def possible_moves(self, position):
        
        for direction in [0, 1, 2, 3]:
            angles = self._rotate_direction_ninety_degrees(direction)
            for angle in angles:
                try:
                    end_loc = self.location.shift(angle).shift(direction).shift(direction)
                    if position.is_square_empty(end_loc):
                        status = notation_const.MOVEMENT
                    elif not position.piece_at_square(end_loc).color == self.color:
                        status = notation_const.CAPTURE
                    else:
                        continue

                    yield Move(end_loc=end_loc,
                               piece=self,
                               status=status,
                               start_loc=self.location)

                except IndexError:
                    pass
1170155
def _forwardImplementation(self, inbuf, outbuf):
        
        assert self.module

        propensities = self.module.getActionValues(0)

        summedProps = sum(propensities)
        probabilities = propensities / summedProps

        action = eventGenerator(probabilities)
#        action = drawIndex(probabilities)

        outbuf[:] = scipy.array([action])
1041164
def build_action(self, runnable, regime, action):
        

        if isinstance(action, StateAssignment):
            return self.build_state_assignment(runnable, regime, action)
        if isinstance(action, EventOut):
            return self.build_event_out(action)
        if isinstance(action, Transition):
            return self.build_transition(action)
        else:
            return ['pass']
147241
def get_actions(self, commands):
        """"""
        actions = []
        for type, turn_based, verb in commands:
            if len(self.action_filter) != 0 and verb not in self.action_filter:
                continue
            if type == 'DiscreteMovement':
                if verb in {"move", "turn", "look",
                            "strafe", "jumpmove", "jumpstrafe"}:
                    actions.append(verb + " 1")
                    actions.append(verb + " -1")
                elif verb in {"jumpeast", "jumpnorth", "jumpsouth",
                              "jumpwest", "movenorth", "moveeast",
                              "movesouth", "movewest", "jumpuse",
                              "use", "attack", "jump"}:
                    actions.append(verb + " 1")
                else:
                    raise CommandHandlerException("Invalid discrete command")
            elif type == 'ContinuousMovement':
                #  Translate to discrete.
                if verb in {"move", "strafe", "pitch", "turn"}:
                    actions.append(verb + " 1")
                    actions.append(verb + " -1")
                elif verb in {"crouch", "jump", "attack", "use"}:
                    actions.append(verb + " 1")
                    actions.append(verb + " 0")
                else:
                    raise CommandHandlerException("Invalid continuous command")
            elif type == 'HumanLevel':
                if verb == 'moveMouse':
                    actions.append('mouseMove 0 0')
                elif verb in {'forward', 'back', 'left', 'right'}:
                    actions.append(verb + ' 1')
                    actions.append(verb + ' 0')
                else:
                    actions.append(verb)
            elif type == 'MissionQuit':
                if verb != 'quit':
                    raise CommandHandlerException("Invalid quit command")
                actions.append(verb)
            elif type == 'Chat':
                if verb != 'chat':
                    raise CommandHandlerException("Invalid chat command")
                actions.append(verb)
            elif type == 'SimpleCraft':
                if verb != 'craft':
                    raise CommandHandlerException("Invalid craft command")
                actions.append(verb)
            elif type == 'AbsoluteMovement' or 'Inventory':
                actions.append(verb)
        return actions
927198
def extend(self, trajectory):
        
        if self.time_step != trajectory.time_step:
            raise ValueError('Trajectory not extended: Time steps of trajectories is incompatible')

        if len(self.species) != len(trajectory.species) and self.species != trajectory.species:
            raise ValueError('Trajectory not extended: species in trajectory do not match')

        self.to_positions()
        trajectory.to_positions()

        self.frac_coords = np.concatenate((self.frac_coords, trajectory.frac_coords), axis=0)
        self.lattice, self.constant_lattice = self._combine_attribute(self.lattice, trajectory.lattice,
                                                                      self.frac_coords.shape[0],
                                                                      trajectory.frac_coords.shape[0])
        self.site_properties = self._combine_attribute(self.site_properties, trajectory.site_properties,
                                                       self.frac_coords.shape[0], trajectory.frac_coords.shape[0])