File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 2323# colored printing of matrices to the terminal
2424# colored package has much finer control than colorama, but the latter is available by default with anaconda
2525try :
26- from colored import fg , bg , attr
26+ from colored import fore , back , style
2727
2828 _colored = True
2929 # print('using colored output')
@@ -916,12 +916,12 @@ def color(c, f):
916916 else :
917917 return f (c )
918918
919- bgcol = color (self ._bgcolor , bg )
920- trcol = color (self ._transcolor , fg ) + bgcol
921- rotcol = color (self ._rotcolor , fg ) + bgcol
922- constcol = color (self ._constcolor , fg ) + bgcol
923- indexcol = color (self ._indexcolor [0 ], fg ) + color (self ._indexcolor [1 ], bg )
924- reset = attr (0 )
919+ bgcol = color (self ._bgcolor , back )
920+ trcol = color (self ._transcolor , fore ) + bgcol
921+ rotcol = color (self ._rotcolor , fore ) + bgcol
922+ constcol = color (self ._constcolor , fore ) + bgcol
923+ indexcol = color (self ._indexcolor [0 ], fore ) + color (self ._indexcolor [1 ], back )
924+ reset = style (0 )
925925 else :
926926 bgcol = ""
927927 trcol = ""
You can’t perform that action at this time.
0 commit comments