(x, y, pt=None)
return rv
Return the matrix to multiply a 2-D point's coordinates by x and y.

    If pt is given, the scaling is done relative to that point.
Return the matrix to multiply a 2-D point's coordinates by x and y.
Return the matrix to multiply a 2 - D point s coordinates by x and y .
def scale(x, y, pt=None):
    """Return the matrix to multiply a 2-D point's coordinates by x and y.

    If pt is given, the scaling is done relative to that point."""
    rv = eye(3)
    rv[0, 0] = x
    rv[1, 1] = y
    if pt:
        from sympy.geometry.point import Point
        pt = Point(pt)
        tr1 = translate(*(-pt).args)
        tr2 = translate(*pt.args)
        return tr1*rv*tr2
    return rv
def scale ( x , y , pt = None ) : rv = eye ( 3 ) rv [ 0 , 0 ] = x rv [ 1 , 1 ] = y if pt : from sympy . geometry . point import Point pt = Point ( pt ) tr1 = translate ( * ( - pt ) . args ) tr2 = translate ( * pt . args ) return tr1 * rv * tr2 return rv