not needed

a = [] is already a list
This commit is contained in:
Martin Diehl 2021-11-24 21:12:13 +01:00
parent 757ba4dba2
commit 3cae915e47
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import json
import functools import functools
import colorsys import colorsys
from pathlib import Path from pathlib import Path
from typing import Sequence, Union, List, TextIO from typing import Sequence, Union, TextIO
import numpy as np import numpy as np
@ -297,7 +297,7 @@ class Colormap(mpl.colors.ListedColormap):
consist of the name of the colormap and extension '.json'. consist of the name of the colormap and extension '.json'.
""" """
colors: List = [] colors = []
for i,c in enumerate(np.round(self.colors,6).tolist()): for i,c in enumerate(np.round(self.colors,6).tolist()):
colors+=[i]+c colors+=[i]+c