From 84b59c03a08ff66001a1c95cc343c301a6dd5edd Mon Sep 17 00:00:00 2001 From: kirlf <33487079+kirlf@users.noreply.github.com> Date: Tue, 12 Feb 2019 11:04:14 +0300 Subject: [PATCH] Update method visualize() Add-on for Python 3 compatibility. In Python 3, the range() method returns a range data type that, for example, does not have a reverse () method. --- commpy/channelcoding/convcode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commpy/channelcoding/convcode.py b/commpy/channelcoding/convcode.py index f26d310..9147a0a 100644 --- a/commpy/channelcoding/convcode.py +++ b/commpy/channelcoding/convcode.py @@ -257,7 +257,7 @@ def visualize(self, trellis_length = 2, state_order = None, edge_colors = ["#9E1BE0", "#06D65D"] if state_order is None: - state_order = range(self.number_states) + state_order = list(range(self.number_states)) font = "sans-serif" fig = plt.figure()