Numpy aware comparison between two values.

def is_different(old_value, new_value):
    """Numpy aware comparison between two values."""
    if opt.has_numpy:
        return not opt.np.array_equal(old_value, new_value)
    else:
        return old_value != new_value