(self, args)
return self._values.new_single().from_value(value)
PMAP: convert between logical and physical coordinates.
PMAP: convert between logical and physical coordinates.
PMAP : convert between logical and physical coordinates .
def pmap_(self, args):
        """PMAP: convert between logical and physical coordinates."""
        # create a new Single for the return value
        coord = values.to_single(next(args))
        mode = values.to_integer(next(args))
        list(args)
        mode = mode.to_int()
        error.range_check(0, 3, mode)
        if self._mode.is_text_mode:
            if mode in (2, 3):
                values.to_integer(coord)
            value = 0
        elif mode == 0:
            value, _ = self._get_window_physical(values.to_single(coord).to_value(), 0.)
        elif mode == 1:
            _, value = self._get_window_physical(0., values.to_single(coord).to_value())
        elif mode == 2:
            value, _ = self._get_window_logical(values.to_integer(coord).to_int(), 0)
        elif mode == 3:
            _, value = self._get_window_logical(0, values.to_integer(coord).to_int())
        return self._values.new_single().from_value(value)
def pmap_ ( self , args ) : # create a new Single for the return value coord = values . to_single ( next ( args ) ) mode = values . to_integer ( next ( args ) ) list ( args ) mode = mode . to_int ( ) error . range_check ( 0 , 3 , mode ) if self . _mode . is_text_mode : if mode in ( 2 , 3 ) : values . to_integer ( coord ) value = 0 elif mode == 0 : value , _ = self . _get_window_physical ( values . to_single ( coord ) . to_value ( ) , 0. ) elif mode == 1 : _ , value = self . _get_window_physical ( 0. , values . to_single ( coord ) . to_value ( ) ) elif mode == 2 : value , _ = self . _get_window_logical ( values . to_integer ( coord ) . to_int ( ) , 0 ) elif mode == 3 : _ , value = self . _get_window_logical ( 0 , values . to_integer ( coord ) . to_int ( ) ) return self . _values . new_single ( ) . from_value ( value )