'Make sure that changes to the global floatx are effectively
taken into account by the backend.'

@pytest.mark.skipif((K.backend() == 'cntk'), reason='cntk    does    not    support    float16')
def test_set_floatx(self):

    old_floatx = floatx()
    set_floatx('float16')
    var = variable([10])
    check_dtype(var, 'float16')
    set_floatx('float64')
    var = variable([10])
    check_dtype(var, 'float64')
    set_floatx(old_floatx)
