上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: 基本上没有资料,实践了很长时间才掌握基本用法。 官网示例 #! /usr/bin/env python3 import pyopencl as cl import numpy as np a_np = np.random.rand(10**7).astype(np.float32) b_np = n 阅读全文
posted @ 2023-01-30 13:35 小鱼圆又圆 阅读(764) 评论(0) 推荐(0)
摘要: 显示当前源 conda config --show channels 添加源 conda config --add channels https://xxx 查看现有环境 conda info -e 创建新环境 conda create -n 环境名称 python=3.10 conda creat 阅读全文
posted @ 2023-01-30 13:05 小鱼圆又圆 阅读(35) 评论(0) 推荐(0)
摘要: 通过source命令设置 示例(将l设置为ls) 首先建立一个文本文件,内容为: alias l='ls' 然后保存,并命令行运行: source xxx(文件名称) source也可以用一个英文句点来替代 运行之后,就可以直接用l命令替代ls了,类似的,可以有以下快捷命令: alias la='l 阅读全文
posted @ 2023-01-30 10:12 小鱼圆又圆 阅读(1589) 评论(0) 推荐(0)
摘要: 可以,不会有任何影响。 阅读全文
posted @ 2023-01-30 10:01 小鱼圆又圆 阅读(1056) 评论(0) 推荐(0)
摘要: 设置图片长宽比 有以下方法: plt.gcf().set_size_inches(width, height) # 单独设置 plt.gcf()代表获取pyplot目前的figure对象 调用返回的figure对象set_size_inches方法调节画布尺寸 也可以直接用fig对象的set_siz 阅读全文
posted @ 2023-01-21 12:24 小鱼圆又圆 阅读(6886) 评论(0) 推荐(0)
摘要: loc参数 Location String Location Code 'best' 0 'upper right' 1 'upper left' 2 'lower left' 3 'lower right' 4 'right' 5 'center left' 6 'center right' 7 阅读全文
posted @ 2023-01-21 12:13 小鱼圆又圆 阅读(148) 评论(0) 推荐(0)
摘要: matplotlib 设置字体 首先确保有字体文件 windows字体文件夹:C:\Windows\Fonts Linux字体文件夹:/usr/share/fonts 只要把字体文件复制粘贴到对应文件夹即可使用。 阅读全文
posted @ 2023-01-21 11:55 小鱼圆又圆 阅读(70) 评论(0) 推荐(0)
摘要: Python永久换源 pip config set global.index-url https://pypi.douban.com/simple 源地址: # 腾讯 http://mirrors.tencentyun.com/pypi/simple # 阿里 https://mirrors.ali 阅读全文
posted @ 2023-01-20 20:03 小鱼圆又圆 阅读(226) 评论(0) 推荐(0)
摘要: : No such file or directory Linux下用./a.py类似命令时只显示标题所示信息:: No such file or directory 原因是直接把Windows下的脚本传输到了linux上,Windows的回车符是'\r\n', Linux和Mac的回车符是'\n' 阅读全文
posted @ 2023-01-18 14:55 小鱼圆又圆 阅读(501) 评论(0) 推荐(0)
摘要: 多进程与单线程写入文件测试测试 名称 含义 用时(s) 写文件总用时(s) 单核写入全文 146 146 多核并行写入多(6)部分 101 cat合并 linux cat命令 173 274 python shutil 用python shutil包的copyfileobj函数拷贝文件 123 22 阅读全文
posted @ 2023-01-16 10:31 小鱼圆又圆 阅读(80) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 下一页