def set_array_axis_names(kernel, ary_names, dim_names):
    """
    .. versionchanged:: 2016.2

        This function was called :func:`set_array_dim_names` before version 2016.2.
    """
    from loopy.kernel.tools import ArrayChanger
    if isinstance(ary_names, str):
        ary_names = ary_names.split(',')
    if isinstance(dim_names, str):
        dim_names = tuple(dim_names.split(','))
    for ary_name in ary_names:
        achng = ArrayChanger(kernel, ary_name)
        ary = achng.get()
        ary = ary.copy(dim_names=dim_names)
        kernel = achng.with_changed_array(ary)
    return kernel
