File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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')
@@ -926,12 +926,12 @@ def color(c, f):
926926 else :
927927 return f (c )
928928
929- bgcol = color (self ._bgcolor , bg )
930- trcol = color (self ._transcolor , fg ) + bgcol
931- rotcol = color (self ._rotcolor , fg ) + bgcol
932- constcol = color (self ._constcolor , fg ) + bgcol
933- indexcol = color (self ._indexcolor [0 ], fg ) + color (self ._indexcolor [1 ], bg )
934- reset = attr (0 )
929+ bgcol = color (self ._bgcolor , back )
930+ trcol = color (self ._transcolor , fore ) + bgcol
931+ rotcol = color (self ._rotcolor , fore ) + bgcol
932+ constcol = color (self ._constcolor , fore ) + bgcol
933+ indexcol = color (self ._indexcolor [0 ], fore ) + color (self ._indexcolor [1 ], back )
934+ reset = style (0 )
935935 else :
936936 bgcol = ""
937937 trcol = ""
You can’t perform that action at this time.
0 commit comments