当前位置:网站首页>Jenkspy package installation
Jenkspy package installation
2022-04-23 18:00:00 【Be happy to study today】
jenkspy Bag installation pit *
use jenkspy Realization arcgis Natural breakpoint method in , There are many problems in the installation process :
A pit : My computer is equipped with Python2.7,Python3.9 Two environments , If direct pip install jenkpy , Then the system displays unable to create…, That means the system can't distinguish pip yes python2 still python3 The path of
How to set up multiple python Environmental Science
Pit two : After solving a problem , I am here python3 Installation in environment python3 -m pip install jenkspy, The error displayed is that the... Cannot be installed tar.gz file , Later it was found that python The version doesn't match ,jenkspy The latest version only supports up to 3.8, It happens that there is no 3.9 Version of ... There is less than 3.9 The version should be able to be installed directly , If it shows runtimeerror, According to python Version to download the corresponding compressed package , Link to :
jenkspy
Pit three : I don't want to reload 3.8 Of python edition , So try to use python2 download , The result shows a new error :Microsoft Visual C++ 9.0 is required.. Then the whole network looks for resources , eureka VCForPython27.msi8 Download , Then the problem is solved successfully .

Pit four : Even though it's loaded with , But the operation will report an error , So I modified core.py After the source code , It's running successfully :
from collections.abc import Iterable
Change it to from collections import Iterable
from math import isfinite
Change it to import math
values = [i for i in values if isfinite(i)]
Change it to values = [i for i in values if np.isfinite(i)]
Code practice
import jenkspy
import random
''' jenks_breaks( [1.3, 7.1, 7.3, 2.3, 3.9, 4.1, 7.8, 1.2, 4.3, 7.3, 5.0, 4.3], nb_class = 3) # Should output (1.2, 2.3, 5.0, 7.8) '''
list_of_values = [1.3, 7.1, 7.3, 2.3, 3.9, 4.1, 7.8, 1.2, 4.3, 7.3, 5.0, 4.3]
breaks = jenkspy.jenks_breaks(list_of_values, nb_class=3)
print(breaks)
The running result is correct :

版权声明
本文为[Be happy to study today]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230545528196.html
边栏推荐
- Implementation of object detection case based on SSD
- [UDS unified diagnostic service] v. diagnostic application example: Flash bootloader
- The JS timestamp of wechat applet is converted to / 1000 seconds. After six hours and one day, this Friday option calculates the time
- Selenium + phantom JS crack sliding verification 2
- Eigen learning summary
- MySQL_ 01_ Simple data retrieval
- Compilation principle first set follow set select set prediction analysis table to judge whether the symbol string conforms to the grammar definition (with source code!!!)
- Install pyshp Library
- Use of list - addition, deletion, modification and query
- 读取excel,int 数字时间转时间
猜你喜欢

On the problem of V-IF display and hiding

Summary of floating point double precision, single precision and half precision knowledge

Classification of cifar100 data set based on convolutional neural network

Re regular expression

2022年流动式起重机司机国家题库模拟考试平台操作

Gets the time range of the current week

Uniapp custom search box adaptation applet alignment capsule

Tell the truth of TS

2022江西光伏展,中国分布式光伏展会,南昌太阳能利用展

Romance in C language
随机推荐
Implementation of image recognition code based on VGg convolutional neural network
Implementation of k8s redis one master multi slave dynamic capacity expansion
Amount input box, used for recharge and withdrawal
C network related operations
.104History
2022 tea artist (primary) examination simulated 100 questions and simulated examination
Type judgment in [untitled] JS
Transfer learning of five categories of pictures based on VGg
Fashion classification case based on keras
MySQL_01_简单数据检索
C# 网络相关操作
2022年广东省安全员A证第三批(主要负责人)特种作业证考试题库及在线模拟考试
.104History
Encapsulate a timestamp to date method on string prototype
proxy server
Read excel, int digital time to time
[UDS unified diagnostic service] IV. typical diagnostic service (4) - online programming function unit (0x34-0x38)
Secure credit
Welcome to the markdown editor
Qtablewidget usage explanation