当前位置:网站首页>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
边栏推荐
- The method of changing a value in the array and a value in the object of wechat applet
- 极致体验,揭晓抖音背后的音视频技术
- String function in MySQL
- Listen for click events other than an element
- cartographer_ There is no problem compiling node, but running the bug that hangs directly
- 2022江西储能技术展会,中国电池展,动力电池展,燃料电池展
- Re regular expression
- Applet learning notes (I)
- JS interview question: FN call. call. call. Call (FN2) parsing
- Classes and objects
猜你喜欢

.105Location

Detailed deployment of flask project

In JS, t, = > Analysis of

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

.104History
![C1 notes [task training chapter I]](/img/2b/94a700da6858a96faf408d167e75bb.png)
C1 notes [task training chapter I]

JS get link? The following parameter name or value, according to the URL? Judge the parameters after

Uniapp custom search box adaptation applet alignment capsule
![C1 notes [task training part 2]](/img/10/48f7490a6c097f2b178ae948cb2c91.png)
C1 notes [task training part 2]

cv_ Solution of mismatch between bridge and opencv
随机推荐
Tensorflow tensor introduction
JS implementation private attribute
Nat Commun|在生物科学领域应用深度学习的当前进展和开放挑战
ROS package NMEA_ navsat_ Driver reads GPS and Beidou Positioning Information Notes
.104History
Land cover / use data product download
消费者灰度实现思路
Detailed deployment of flask project
positioner
C network related operations
Amount input box, used for recharge and withdrawal
Add animation to the picture under V-for timing
YOLOv4剪枝【附代码】
The method of changing a value in the array and a value in the object of wechat applet
C language loop structure program
油猴网站地址
Selenium + phantom JS crack sliding verification 2
How to read literature
Leak detection and vacancy filling (VII)
cv_ Solution of mismatch between bridge and opencv