# Path: pyti/catch_errors.py
# def check_for_period_error(data, period):
# def check_for_input_len_diff(*args):


import numpy as np
from pyti import catch_errors
from six.moves import range
from __future__ import absolute_import


def volume_index_helper(vi, idx, close_data):
    return (vi[idx-1] + (((close_data[idx] - close_data[idx-1]) /
                          float(close_data[idx-1])) * vi[idx-1])

# Path: pyti/catch_errors.py
# def check_for_period_error(data, period):
# def check_for_input_len_diff(*args):


# Path: pyti/volume_index.py
import numpy as np
from pyti import catch_errors
from six.moves import range

from __future__ import absolute_import


def volume_index_helper(vi, idx, close_data):
    return (vi[idx-1] + (((close_data[idx] - close_data[idx-1]) /
                          float(close_data[idx-1])) * vi[idx-1])

           )