Skip to content

Commit

Permalink
determine_median bug
Browse files Browse the repository at this point in the history
- Fixed a determine_median error, related to an error that crept in testing
  although it is not currently used, it was included incorrectly as in
  patterning the value range of the timeseries had has already been panda.Series
  into an array.  Committed to master branch.
Modified:
skyline/skyline/analyzer/algorithms.py
skyline/skyline/analyzer_dev/algorithms_dev.py
skyline/skyline/mirage/mirage_algorithms.py
  • Loading branch information
earthgecko committed Jul 29, 2016
1 parent 9c9d5ed commit 9dcf8ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions skyline/analyzer/algorithms.py
Expand Up @@ -412,14 +412,14 @@ def record_algorithm_error(algorithm_name, traceback_format_exc_string):
return False


def determine_median(array):
def determine_median(timeseries):
"""
Determine the median in an array of values
Determine the median of the values in the timeseries
"""

# logger.info('Running ' + str(get_function_name()))
try:
np_array = np.array(array)
np_array = pandas.Series([x[1] for x in timeseries])
except:
return False
try:
Expand Down
6 changes: 3 additions & 3 deletions skyline/analyzer_dev/algorithms_dev.py
Expand Up @@ -328,14 +328,14 @@ def ks_test(timeseries):
return None


def determine_median(array):
def determine_median(timeseries):
"""
Determine the median in an array of values
Determine the median of the values in the timeseries
"""

# logger.info('Running ' + str(get_function_name()))
try:
np_array = np.array(array)
np_array = pandas.Series([x[1] for x in timeseries])
except:
return False
try:
Expand Down
6 changes: 3 additions & 3 deletions skyline/mirage/mirage_algorithms.py
Expand Up @@ -389,14 +389,14 @@ def record_algorithm_error(algorithm_name, traceback_format_exc_string):
return False


def determine_median(array):
def determine_median(timeseries):
"""
Determine the median in an array of values
Determine the median of the values in the timeseries
"""

# logger.info('Running ' + str(get_function_name()))
try:
np_array = np.array(array)
np_array = pandas.Series([x[1] for x in timeseries])
except:
return False
try:
Expand Down

1 comment on commit 9dcf8ff

@earthgecko
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

determine_array_median readded at 3656070

Please sign in to comment.