(self, y, bounds=None, copy=True, copy_always=False, archive=None)
return x
maps the phenotypic input argument into the genotypic space.
        If `bounds` are given, first `y` is projected into the feasible
        domain. In this case ``copy==False`` leads to a copy.

        by default a copy is made only to prevent to modify ``y``

        method geno is only needed if external solutions are injected
        (geno(initial_solution) is depreciated and will disappear)

        TODO: arg copy=True should become copy_never=False
maps the phenotypic input argument into the genotypic space.
        If `bounds` are given, first `y` is projected into the feasible
        domain. In this case ``copy==False`` leads to a copy.
maps the phenotypic input argument into the genotypic space . If bounds are given first y is projected into the feasible domain . In this case copy == False leads to a copy .
def geno(self, y, bounds=None, copy=True, copy_always=False, archive=None):
        """maps the phenotypic input argument into the genotypic space.
        If `bounds` are given, first `y` is projected into the feasible
        domain. In this case ``copy==False`` leads to a copy.

        by default a copy is made only to prevent to modify ``y``

        method geno is only needed if external solutions are injected
        (geno(initial_solution) is depreciated and will disappear)

        TODO: arg copy=True should become copy_never=False

        """
        if archive is not None and bounds is not None:
            try:
                return archive[y]['geno']
            except:
                pass

        x = array(y, copy=(copy and not self.isidentity) or copy_always)

        # bounds = self.bounds if bounds is None else bounds
        if bounds is not None:  # map phenotyp into bounds first
            x = self.into_bounds(x, bounds)

        if self.isidentity:
            return x

        # user-defined transformation
        if self.tf_geno is not None:
            x = array(self.tf_geno(x), copy=False)
        else:
            _Error('t1 of options transformation was not defined but is needed as being the inverse of t0')

        # affine-linear transformation: shift and scaling
        if self.typical_x is not 0:
            x -= self.typical_x
        if self.scales is not 1:  # just for efficiency
            x /= self.scales

        # kick out fixed_values
        if self.fixed_values is not None:
            # keeping the transformed values does not help much
            # therefore it is omitted
            if 1 < 3:
                keys = sorted(self.fixed_values.keys())
                x = array([x[i] for i in range(len(x)) if i not in keys], copy=False)
            else:  # TODO: is this more efficient?
                x = list(x)
                for key in sorted(list(self.fixed_values.keys()), reverse=True):
                    x.remove(key)
                x = array(x, copy=False)
        return x
def geno ( self , y , bounds = None , copy = True , copy_always = False , archive = None ) : if archive is not None and bounds is not None : try : return archive [ y ] [ 'geno' ] except : pass x = array ( y , copy = ( copy and not self . isidentity ) or copy_always ) # bounds = self.bounds if bounds is None else bounds if bounds is not None : # map phenotyp into bounds first x = self . into_bounds ( x , bounds ) if self . isidentity : return x # user-defined transformation if self . tf_geno is not None : x = array ( self . tf_geno ( x ) , copy = False ) else : _Error ( 't1 of options transformation was not defined but is needed as being the inverse of t0' ) # affine-linear transformation: shift and scaling if self . typical_x is not 0 : x -= self . typical_x if self . scales is not 1 : # just for efficiency x /= self . scales # kick out fixed_values if self . fixed_values is not None : # keeping the transformed values does not help much # therefore it is omitted if 1 < 3 : keys = sorted ( self . fixed_values . keys ( ) ) x = array ( [ x [ i ] for i in range ( len ( x ) ) if i not in keys ] , copy = False ) else : # TODO: is this more efficient? x = list ( x ) for key in sorted ( list ( self . fixed_values . keys ( ) ) , reverse = True ) : x . remove ( key ) x = array ( x , copy = False ) return x