
Bug
bug原意是“臭虫”,现在用来指代计算机上存在的漏洞,原因是系统安全策略上存在的缺陷,有攻击者能够在未授权的情况下访问的危害。
缘 源 园
https://mp.weixin.qq.com/s/EtndbQk9m9n75xiQsDcvww 欢迎关注博主微信公众号。一起交流互动更多问题。
展开
-
Python运行常见小错误
Python 是解释性语言程序错误原因有单词拼写错误 nameError: name’pirnt’is not defined Print(“hello python”)Print(“hello python”)多行语法不要写在同一行,SyntaxError:Invalid syntax 缩进错误 indentationError:unexpected indent prython2.0 解释器不支持中文syntaxError:Non-ASC11 character python3....原创 2021-04-11 14:06:06 · 423 阅读 · 0 评论 -
安装lightgbm出现错误read operation timed out
如果你在安装lightgbm使用得pip installlightgbm出现The read operation timed out错误。pip3 install lightgbmCollecting lightgbm WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) HTTPSConnectionPool(host='files.pythonhosted.org'.原创 2021-03-17 00:27:06 · 614 阅读 · 0 评论 -
NameError: name ‘randn‘ is not defined
需要导入对应的包。from numpy.random import randn 或者 from scipy import randn# 从 numpy 或者 scipy 中导入 randn() 函数from numpy.random import randnfrom scipy import randn# 随机生成一个100维的向量arr = randn(20)arr'''array([-0.67273308, -0.27232654, 0.24514084, -1.03201826原创 2021-03-14 00:13:18 · 2536 阅读 · 0 评论 -
‘DataFrame‘ object has no attribute ‘get_dtype_counts‘
代码中subset对应的值是列名,表示只考虑这两列,将这两列对应值相同的行进行去重。默认值为subset=None表示考虑所有列。原创 2021-03-09 13:18:41 · 2469 阅读 · 0 评论 -
import apriori导入出现错误SyntaxError: Missing parentheses in call to ‘print‘. Did you mean print(freqSet-
import apriori'''Traceback (most recent call last): File "C:\Users\Administrator\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3343, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-37.原创 2021-03-09 13:10:38 · 3797 阅读 · 1 评论 -
ValueError: invalid literal for int() with base 10
有时候需要用int()函数转换字符串为整型,但是切记int()只能转化由纯数字组成的字符串. 非纯数字组成的字符串强转为整型会报错:ValueError: invalid literal for int() with base 10str1='3.1415926'#转换为整数类型int(str1)'''---------------------------------------------------------------------------ValueError原创 2021-03-09 13:01:28 · 1678 阅读 · 0 评论 -
ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64‘).
因为许多机器学习算法库并不支持对inf的处理。所以出现报错。我们需要找出数据中是否含有inf或者nan的值。#显示是否存在inf值np.isinf(np.inf)#Trues1 = pd.Series([1,2,3,np.inf])s1'''0 1.01 2.02 3.03 NaN'''#对inf填补 0>>>s1[np.isinf(s1)] = 0>>>s10 1.01 2.02 3原创 2021-03-06 04:42:45 · 764 阅读 · 0 评论 -
eq, neq.gt,ge,lte,lt,not,mod的含义
lt:less than 小于lte、le:less than or equal to 小于等于eq:equal to 等于ne、neq:not equal to 不等于gte、ge:greater than or equal to 大于等于gt:greater than 大于not非 mod求模 is [not] div by是否能被某数整除 is [not] even是否为偶数 is [not] even by $b即($a / $b) % 2 == 0 is [n.原创 2021-03-01 23:06:41 · 896 阅读 · 0 评论 -
python import cv2出错
import cv2如果导入import cv2 出现错误,没有找到cv2。应该安装opencv-pythonpip install opencv-python原创 2021-02-28 11:04:40 · 466 阅读 · 0 评论