(*product)
return answer
numpy version of tensor product of multiple arguments.
numpy version of tensor product of multiple arguments.
numpy version of tensor product of multiple arguments .
def _numpy_tensor_product(*product):
    """numpy version of tensor product of multiple arguments."""
    if not np:
        raise ImportError
    answer = product[0]
    for item in product[1:]:
        answer = np.kron(answer, item)
    return answer
def _numpy_tensor_product ( * product ) : if not np : raise ImportError answer = product [ 0 ] for item in product [ 1 : ] : answer = np . kron ( answer , item ) return answer