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(objectdtype=Nonecopy=Trueorder='K'subok=Falsendmin=0)

a = np.zeros([0,0,24])
a.shape
(0, 0, 24)
a
array([], shape=(0, 0, 24), dtype=float64)

numpy.zeros(shapedtype=floatorder='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.

最新文章

  1. 笔记整理之BCP
  2. jquery一些基本函数
  3. HttpClient + Jsoup模拟登录教务处并获取课表
  4. Tomcat系列之Java技术详解
  5. java基础-基础类型包装类型
  6. c#基础知识对比(面向对象)
  7. [二]Ajax基本实现
  8. 【POJ2774】Long Long Message (后缀数组)
  9. CSS控制表单
  10. sctf pwn300
  11. SQLServer 2008的组成
  12. android JB2连拍降速原理介绍
  13. mac 下mysql
  14. Socket网络编程详解
  15. Git常用命令及场景
  16. TP thinkphp 权限管理 权限认证 功能
  17. Django的路由层(2)
  18. 带你从零学ReactNative开发跨平台App开发-[react native 仿boss直聘](十三)
  19. 第六章、Linux 的文件权限与目录配置
  20. CSS3 简介

热门文章

  1. JS中new的实现原理及重写
  2. SAP 序列号与库存关联起来?
  3. mysql数据库批量执行sql文件对数据库进行操作【windows版本】
  4. VUE中使用XLSX实现导出excel表格
  5. Codeforces Round447 D树上前缀和
  6. Java对象拷贝备忘
  7. Java 代码块详解
  8. 页面上icon较多,又不想使用臃肿的结构怎么办?
  9. c#---params参数
  10. Auto-scaling scikit-learn with Apache Spark