You can describe A and B at the same time:

    A, B: array-like
        input matrices

By the way, this function only accepts numpy.ndarray. Lists will not be accepted, since there is an access to dtype in the first line.