
Python
Superpower_ww
这个作者很懒,什么都没留下…
展开
-
Error in moviepy setup command: 'extras_require' must be a dictionary whose values are strings or li
Python: error in moviepy setup command: ‘extras_require’ must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.在Python 3.5中,使用命令pip...原创 2019-01-17 15:19:45 · 15398 阅读 · 3 评论 -
Python中self的用法详解(链接传送)
Python中的self是什么意思?Python新手,今天看了一篇详细易懂的self用法介绍,感觉开了些窍,这里附上链接,以方便复习.Python中self用法详解(转载自CLHugh)...转载 2019-01-22 20:43:25 · 3832 阅读 · 0 评论 -
Python: numpy.fliplr()
np.fliplr()的作用fliplr()是Numpy库中的函数,作用是将数组在左右方向上翻转.需要注意的是,fliplr()在左右方向上翻转每行的元素,列保持不变,但是列的显示顺序变了.下面我们来看一下github上给出的fliplr()函数的source代码:def fliplr(m): """ Flip array in the left/right directi...原创 2019-01-19 22:51:51 · 11989 阅读 · 0 评论 -
Python: Shuffle()的作用
shuffle()函数的作用shuffle()的作用是混排序列中的元素,序列中元素顺序改变,但其内容不变.import numpy as npa = np.arange(10)print("a=", a )np.random.shuffle(a)print("After shuffle, a=", a )a= [0 1 2 3 4 5 6 7 8 9]After shuffle,...原创 2019-01-19 16:57:33 · 5798 阅读 · 0 评论 -
Warning: The TensorFlow library wasn't compiled to use SSE,SSE2,SSE3,SSE4.1 instructions
Tensorflow Warning: The TensorFlow library wasn’t compiled to use SSE,SSE2,SSE3,SSE4.1 instructions,but these are available on your machine and could speed up CPU computations.在使用tensorflow时,会一段巨长的wa...原创 2019-01-13 17:53:24 · 847 阅读 · 1 评论 -
Python:Numpy库中的invert()函数的用法
Numpy库中的invert()函数的用法官方解释:Compute bit-wise inversion, or bit-wise NOT, element-wise.Computes the bit-wise NOT of the underlying binary representation of the integers in the input arrays.For signe...原创 2019-01-13 15:01:50 · 15629 阅读 · 0 评论 -
AttributeError: module 'socketio' has no attribute 'Server'
Anaconda 3 + Python 3.5 + Windows 10在Python中运行程序时出现如题所示的报错,错误提示上说问题出在这句代码上:sio = socketio.Server()在github上找到了原因和解决方案,正好是socketio的作者在里面回答的.链接点这里原因一般我们会直接pip安装socketio这个模块,而socketio.Server()这个包在py...原创 2019-01-17 16:54:33 · 4522 阅读 · 2 评论 -
Python: SystemError: Unknown opcode
SystemError: Unknown opcode直接拿别人跑好的模型参数在自己的电脑上运行看结果的时候,容易出现这样的报错,完整的报错通知是这样的:根据提示,可以看到是在加载model的时候出现错误:model = load_model(args.model)为什么load不出来model呢?寻寻觅觅总算get了解决方案,在这里:所以Python 3.5中train出来的...原创 2019-01-17 16:33:13 · 11989 阅读 · 6 评论 -
AttributeError: module 'tensorflow' has no attribute 'python'
AttributeError: module ‘tensorflow’ has no attribute ‘python’ #9在程序中出现以下代码,会报错:AttributeError: module ‘tensorflow’ has no attribute ‘python’import tensorflow as tftf.python.control_flow_ops = tf具...原创 2019-01-17 15:43:03 · 7733 阅读 · 5 评论 -
Python报错 SyntaxError: invalid syntax
今天在跑github上的现成程序时出现了这样一个错误SyntaxError: invalid syntax.提醒有非法语句,哦豁!根据错误提示发现是忘了改调用文件的print语法格式,要加括号.Python 2: print "ABCD"Python 3: print("ABCD")在这里记下笔记提醒自己,以后跑现有程序一定要检查主文件以及调用文件的语法,有些语法在python 2中...原创 2019-06-21 20:33:19 · 2852 阅读 · 0 评论