Skip to content

Commit

Permalink
Support for Python 3. Fixes santosjorge#66
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge Santos committed Jul 27, 2017
1 parent 310cdeb commit ed3e666
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cufflinks/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import copy

from collections import deque
from six import string_types
from IPython.display import HTML, display

from . import themes
Expand Down Expand Up @@ -722,7 +723,7 @@ def get_colorscale(scale):
get_colorscale(['rgb(127,201,127)','rgb(190,174,212)','rgb(253,192,134)'])
"""

if type(scale) in (str, unicode):
if type(scale) in string_types:
scale = get_scales(scale)
else:
if type(scale) != list:
Expand Down
2 changes: 1 addition & 1 deletion cufflinks/ta.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def _ptps(df,periods,high,low,include,str,detail):
_df['LONG']=_df.apply(lambda x:x['T_SAR'] if x['LorS']=='long' else np.nan,axis=1)
_df['SHORT']=_df.apply(lambda x:x['T_SAR'] if x['LorS']=='short' else np.nan,axis=1)
_df=_df.set_index('index')

return rename(df,_df,study,periods,'',include,str,detail,output=output)
detail=kwargs.get('detail',False)
periods=make_list(periods)
Expand Down

0 comments on commit ed3e666

Please sign in to comment.