def all(A, ax=None):
    """Test if all values in A evaluate to True """
    if isinstance(A, Poly):
        out = numpy.zeros(A.shape, dtype=bool)
        B = A.A
        for key in A.keys:
            out += all(B[key], ax)
        return out

    return numpy.all(A, ax)
def all ( A , ax = None ) : if isinstance ( A , Poly ) : out = numpy . zeros ( A . shape , dtype = bool ) B = A . A for key in A . keys : out += all ( B [ key ] , ax ) return out return numpy . all ( A , ax )
Test if all values in A evaluate to True