amphibian-dev / toad

ESC Team's credit scorecard tools.
https://toad.readthedocs.io
MIT License
488 stars 175 forks source link

from toad.plot import bin_plot 报错 #8

Closed Ausar0109 closed 4 years ago

Ausar0109 commented 4 years ago

from toad.plot import bin_plot Traceback (most recent call last): File "C:\miniconda\lib\site-packages\numpy\core\function_base.py", line 117, in linspace num = operator.index(num) TypeError: 'float' object cannot be interpreted as an integer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "C:\miniconda\lib\site-packages\toad\plot.py", line 6, in from .tadpole import tadpole File "C:\miniconda\lib\site-packages\toad\tadpole__init.py", line 5, in from .base import Tadpole File "C:\miniconda\lib\site-packages\toad\tadpole\base.py", line 2, in from .utils import ( File "C:\miniconda\lib\site-packages\toad\tadpole\utils.py", line 16, in HEATMAP_CMAP = sns.diverging_palette(240, 10, as_cmap = True) File "C:\miniconda\lib\site-packages\seaborn\palettes.py", line 744, in diverging_palette neg = palfunc((h_neg, s, l), 128 - (sep / 2), reverse=True, input="husl") File "C:\miniconda\lib\site-packages\seaborn\palettes.py", line 641, in light_palette return blend_palette(colors, n_colors, as_cmap) File "C:\miniconda\lib\site-packages\seaborn\palettes.py", line 777, in blend_palette pal = _ColorPalette(pal(np.linspace(0, 1, n_colors))) File "<array_function__ internals>", line 6, in linspace File "C:\miniconda\lib\site-packages\numpy\core\function_base.py", line 121, in linspace .format(type(num))) TypeError: object of type <class 'float'> cannot be safely interpreted as an integer.

numpy 和 cpython都是最新

Ausar0109 commented 4 years ago

之前用的miniconda ,要用的包都自己装-

重新安装了2019.10最新的anconda 发行版,只运行了pip install toad 解决 应该是自己装包的包版本友好度没有官方的强原因,溯源原因没找到

Secbone commented 4 years ago

多谢反馈,这个原因应该是 seaborn 没有对最新的 numpy 做支持导致的,下个版本我会调整一下依赖版本 :)

mwaskom/seaborn#1907