Browse Source

Analytics works with one labeled segment#191/212 (#217)

* Analytics works with one labeled segment

if/else instead of exception
pull/1/head
Alexandr Velikiy 6 years ago committed by GitHub
parent
commit
2782955572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      analytics/utils/__init__.py

2
analytics/utils/__init__.py

@ -212,7 +212,7 @@ def ar_mean(numbers):
def get_av_model(patterns_list): def get_av_model(patterns_list):
x = len(patterns_list[0]) x = len(patterns_list[0])
if len(patterns_list[1]) != x: if len(pattern_list) > 1 and len(patterns_list[1]) != x:
raise NameError('All elements of patterns_list should have same length') raise NameError('All elements of patterns_list should have same length')
model_pat = [] model_pat = []
for i in range(x): for i in range(x):

Loading…
Cancel
Save