def _cast_inplace(terms, dtype):
    """Cast an expression inplace.

    Parameters
    ----------
    terms : Op
        The expression that should cast.
    dtype : str or numpy.dtype
        The dtype to cast to.
    """
    dt = np.dtype(dtype)
    for term in terms:
        try:
            new_value = term.value.astype(dt)
        except __HOLE__:
            new_value = dt.type(term.value)
        term.update(new_value)
dataset/ETHPy150Open pydata/pandas/pandas/computation/ops.py/_cast_inplace