Check and process 'frames' argument
    into a proper iterable for an animation object

    ## Arguments
    # frames
    : a seed for an integer-type iterable that is used as a sequence of frame indices
    - if integer or integer-valued float (e.g. 1.0):
        The 'frames' is interpreted as the number of total frames
        and the sequence frame indices becomes [ 0, 1, 2, ..., 'frames' - 1 ]
        which is equivalent to range('frames').
    - if array-like:
        All elements in 'frames' should be integer or integer-valued float.
        Then, the 'frames' itself is used as a sequence of frame indices.

def process_frames_argument(frames):
    """
    Check and process 'frames' argument
    into a proper iterable for an animation object

    ## Arguments
    # frames
    : a seed for an integer-type iterable that is used as a sequence of frame indices
    - if integer or integer-valued float (e.g. 1.0):
        The 'frames' is interpreted as the number of total frames
        and the sequence frame indices becomes [ 0, 1, 2, ..., 'frames' - 1 ]
        which is equivalent to range('frames').
    - if array-like:
        All elements in 'frames' should be integer or integer-valued float.
        Then, the 'frames' itself is used as a sequence of frame indices.
    """

    result = None
    if np.iterable(frames):
        try: frames_arr = np.array(frames)
        except: raise TypeError("'frames' should be convertable to numpy.array")
        for idx in range(len(frames_arr)):
            frame_idx = frames_arr[idx]
            assert is_real_number(frame_idx)
            assert int(frame_idx) == frame_idx
            frames_arr[idx] = int(frame_idx)
        #self.frames = frames_arr
        result = frames_arr
    elif is_real_number(frames):
        assert int(frames) == frames
        frames = int(frames)
        #self.frames = range(frames)
        result = range(frames)

    return result