python package install error and little code bugs
When you install packages using setup.py, the error:
(py37) C:\Users\weda\Phd\python packages\visibility_graph-0.4>python setup.py install
Traceback (most recent call last):
File "setup.py", line 11, in
long_description=readme(),
File "setup.py", line 5, in readme
return f.read()
File "C:\Users\weda\AppData\Local\Continuum\anaconda3\envs\py37\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 1725: character maps to
Here's the solution: stackoverflow
The difference of ndarray declare.
a = np.array([0,0,24])
a.shape
(3,)
a
array([ 0, 0, 24])
a = np.array((1,2))
a
array([1, 2])
a.shape
(2,)
There's no difference of passing parameter in () or [] format. And the first parameter represent the data value.
numpy.array(object, dtype=None, copy=True, order='K', subok=False, ndmin=0)
a = np.zeros([0,0,24])
a.shape
(0, 0, 24)
a
array([], shape=(0, 0, 24), dtype=float64)
numpy.zeros(shape, dtype=float, order='C'); The first parameter is shape with [].
The problem when converting list into ndarray: list长度不规则
另一个小问题,赋值问题,a = a.tolist(), dataframe = dataframe.drop([count]); 这些函数返回新的值,需要重新赋值。
list.remove(), the parameter is the value of deleted item and cannot be the index. Otherwise, you need to use 'del' function or 'pop' function. From here.
python package install error and little code bugs的更多相关文章
- Package CJK Error: Invalid character code. 问题解决方法--xelatex和pdflatex编译的转换
Package CJK Error: Invalid character code. 问题解决方法--xelatex和pdflatex编译的转换 解决方法:添加格式说明信息 将下面语句: \docum ...
- Python package install血泪史
[前言][絮絮叨叨篇]:说实话,不是第一次安装Python库了,但是貌似没有特别顺利的时候,可能还是遇到的困难不够多咯.配置环境真是个糟心的事儿,不过作为菜鸟,还是得磨练磨练,毕竟某人云:" ...
- MVN package install error javac: invalid target release: 1.8
现象:---------------------------------[ERROR] Failure executing javac, but could not parse the error:j ...
- python pip install error
使用pip install的时候报错 解决方法是使用如下的命令进行安装 python -m pip install sqlalchemy 升级pip的命令python2 -m pip install ...
- Python Django install Error
Exception:Traceback (most recent call last): File "/home/djangogirls/myvenv/lib/python3.6/site ...
- sudo apt install libreadline-dev Reading package lists... Error!
luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ ...
- redhat 6安装python 3.7.4报错ModuleNotFoundError: No module named '_ctypes' make: *** [install] Error 1
问题描述: 今天在测试环境中,为了执行脚本,安装下python3命令,在执行make install的时候报错: ModuleNotFoundError: No module named '_ctyp ...
- Reading package lists... Error! 解决方案
ubuntu 下安装python开发包,执行命令 sudo apt-get install python-dev,报错: Reading package lists... Error! E: Enco ...
- qrcode 4.0.4 : Python Package Index
qrcode 4.0.4 : Python Package Index qrcode 4.0.4 Download qrcode-4.0.4.tar.gz QR Code image generato ...
随机推荐
- AndroidStudio报错:Emulator: I/O warning : failed to load external entity "file:/C:/Users/Administrator/.AndroidStudio3
场景 在进行Android Studio的.Android Studio目录从C盘修改为其他目录后,新建App启动提示: Emulator: I/O warning : failed to load ...
- eclipse中一个项目引用另一个项目的方法
我们在开发的时候,有时候需要把一个大的项目打散,尤其是现在微服务的架构很流行,一个大的项目往往被拆成很多小的项目,而有的项目作为公共工程被独立出来,比如有个工程专门提供各种Util工具类,有的工程专门 ...
- JavaScript DOMEvent 对象
Event 对象 Event 对象代表事件的状态,比如事件在其中发生的元素.键盘按键的状态.鼠标的位置.鼠标按钮的状态. 事件通常与函数结合使用,函数不会在事件发生前被执行! 事件句柄 (Event ...
- 在ServletFilter层返回多字段提示给前端
0.背景:在由于不想在小项目中引入SpringSecurity这种重量级安全框架,我自定义了一个LoginFilter来处理认证+授权逻辑.对于认证或授权失败的情况,最初是在filter中抛出异常,并 ...
- (办公)记事本_linux压缩命令
参考谷粒学院的linux视频教程:http://www.gulixueyuan.com/course/300/task/7091/show 在Linux中可以识别的常见的压缩格式有十几种,比如&quo ...
- 【笔记】机器学习 - 李宏毅 - 10 - Tips for Training DNN
神经网络的表现 在Training Set上表现不好 ----> 可能陷入局部最优 在Testing Set上表现不好 -----> Overfitting 过拟合 虽然在机器学习中,很容 ...
- Selenium-浏览器兼容性测试自动化
Selenium 使浏览器兼容性测试自动化成为可能,但是在不同的浏览器上依然有细微的差别 测试浏览器的兼容性--测试你的应用程序看是否能够很好得工作在不同浏览器和操作系统之上. 测试系统功能--创建回 ...
- 剑指offer-面试题30-包含min函数的栈-栈
/* 题目: 定义栈的数据结构,实现一个能够得到栈的最小元素的min函数. */ /* 思路: 错误思路:每次保存当前最小的元素,如果当前最小元素弹出,最小元素是谁? 正确思路:两个栈,一个栈保存数据 ...
- CodeForces - 1109A
#include<cstdio> #include<map> #include<iostream> #include<algorithm> using ...
- PAT 基础编程题目集 6-7 统计某类完全平方数 (20 分)
本题要求实现一个函数,判断任一给定整数N是否满足条件:它是完全平方数,又至少有两位数字相同,如144.676等. 函数接口定义: int IsTheNumber ( const int N ); 其中 ...