Skip to content

Commit

Permalink
added check for no data on filters/is_monotonic.py
Browse files Browse the repository at this point in the history
  • Loading branch information
westphallm1 committed Apr 18, 2018
1 parent 06413a8 commit 09321ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion specdal/filters/is_monotonic.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import pandas as pd
def is_monotonic(collection):
return (pd.Series(collection.data.index).diff()[1:]>0).all()
try:
return (pd.Series(collection.data.index).diff()[1:]>0).all()
except:
return False

0 comments on commit 09321ba

Please sign in to comment.