
python
_Carpediem
是你自己选择养老的
展开
-
NumPy-排序搜索计数集合
import numpy as npx=np.random.randint(1,10,10)print(x)[2 2 6 2 6 4 2 3 1 6]x = np.random.rand(5, 5) * 10 x = np.around(x, 2) print(x)[[8.68 2.14 3.02 1.86 7.85] [1.76 5.14 6.52 4.49 7.2 ] [8.16 7.3 2.34 2.37 7.31] [1.58 9.48 0.14 9.29 6.6 ]原创 2020-10-30 00:24:48 · 191 阅读 · 0 评论 -
NumPy-数学函数&逻辑函数
1.数学函数2.逻辑函数numpy.logical_notnumpy.logical_andnumpy.logical_ornumpy.logical_xornumpy.logical_not(x, *args, **kwargs)Compute the truth value of NOT x element-wise.numpy.logical_and(x1, x2, *args, **kwargs) Compute the truth value of x原创 2020-10-27 13:12:40 · 148 阅读 · 0 评论 -
NumPy-数组的操作
参考连接:stack,vstack,hstack学习链接:datawhale组队学习Numpy原创 2020-10-25 23:20:57 · 95 阅读 · 0 评论 -
NumPy-索引&切片&迭代
1.索引与切片2.dots索引3.整数索引4.布尔数组索引叠加后:5.数组迭代原创 2020-10-21 13:54:57 · 171 阅读 · 0 评论 -
NumPy-数据类型及数组的创建
运行环境:jupyter notebook+python3.6+numpy1.19.11. 常量2.数据类型3.时间日期和时间增量numpy.datetime64()将字符串转换成时间日期类型datetime64应用例子:4.数组的创建numpy 提供的最重要的数据结构是ndarray,它是 python 中list的扩展。...原创 2020-10-20 11:55:50 · 199 阅读 · 0 评论