def cast(x, dtype):
    if dtype == 'floatX':
        dtype = config.floatX

    _x = as_scalar(x)
    if _x.type.dtype == dtype:
        return _x
    if _x.type.dtype.startswith('complex') and not dtype.startswith('complex'):
        raise TypeError('Casting from complex to real is ambiguous: consider'
                        ' real(), imag(), angle() or abs()')
    return _cast_mapping[dtype](_x)
:return: An ``rpm_version`` and cache it.
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/scalar/basic.py/cast--crossover with--dataset/ETHPy150Open ClusterHQ/flocker/admin/packaging.py/DelayedRpmVersion.rpm_version