Python-numpy库

作者: JUNjianshuZHU | 来源:发表于2018-02-23 16:53 被阅读0次

1、引入numpy库

import numpy as np

2、创建数组

'''创建新的数组'''
1、a = np.array([1,2,3,4,5])  --->array([1, 2, 3, 4, 5])
2、c = np.array([[1,2],[5,6],[9,10]])
--->
array([[ 1,  2],
       [ 5,  6],
       [ 9, 10]])
3、x = np.empty((3,2,1), dtype =  np.int8)       
# empty创建随机数数组,zeros都是0的数组,ones都是1的数组
--->
[[[         0]
  [1072168960]]
 [[         0]
  [1072168960]]
 [[         0]
  [         0]]]
'''根据已有的列表或元组创建数组'''
x =  [1,2,3]
a = np.asarray(x)   ---> [1 2 3]    
'''自动构造数组arange\linspace\logspace'''
g = np.arange(0,10,1).reshape(2,-1)      #以序列方式构造数组,1表示步长
--->
array([[0, 1, 2, 3, 4],
       [5, 6, 7, 8, 9]])
------------------------------------------------------------------------------------------
h = np.linspace(0,10,5)      #以等差的方式构造数组,5表示数组中元素个数
--->array([  0. ,   2.5,   5. ,   7.5,  10. ])
------------------------------------------------------------------------------------------
i = np.logspace(0,10,5)      #以等比的方式构造数组,5表示数组中元素个数
--->array([  1.00000000e+00,   3.16227766e+02,   1.00000000e+05,
         3.16227766e+07,   1.00000000e+10])
'''高级构造数组法'''
def func(i):
    return i%4+1

np.fromfunction(func,[5,])      #fromfunction函数的第一个参数为计算每个数组元素的函数,第二个参数为数组的大小(shape)

--->array([ 1.,  2.,  3.,  4.,  1.])

关于fromfunction的源代码:
def fromfunction(function, shape, **kwargs):
    dtype = kwargs.pop('dtype', float)
    args = indices(shape, dtype=dtype)
    return function(*args,**kwargs)
-----------------------------------------------------------------------------------
np.fromfunction(lambda x,y : 5*x + y,(4,4))      #x,y代表行列索引
--->
[[  0.   1.   2.   3.]
 [  5.   6.   7.   8.]
 [ 10.  11.  12.  13.]
 [ 15.  16.  17.  18.]]

3、数组的基本属性

'''示例数组'''
a = np.array([[1,2],[5,6],[9,10]])
--->
array([[ 1,  2],
       [ 5,  6],
       [ 9, 10]])
#数组类型
type(a)  --->numpy.ndarray

#数据类型
a.dtype  --->dtype('int32')

#数组的轴数量(秩)
a.ndim  --->2

#数组的长度
a.size  --->6

#数组的形状
a.shape  --->(3, 2)

4、数组切片/索引

'''一维数组索引'''
a = np.arange(10)
s = slice(2,7,2)      #等同于 b = a[2:7:2]  
print a[s]  --->[2  4  6]
'''二维数组索引'''
(1)
a = np.array([[1,2,3],[3,4,5],[4,5,6]])  

print(a[...,1])  --->[2 4 5]       #取第二列
print(a[1,...])  --->[3 4 5]       #取第二行
print(a[...,1:])                   # 取第二行第二列
--->[[2 3]
     [4 5]
     [5 6]]
(2)
x = np.array([[1,  2],  [3,  4],  [5,  6]]) 
--->[[1, 2],
     [3, 4],
     [5, 6]]

y = x[[0,1,2],  [0,1,0]]  --->[1, 4, 5]
#[0,1,2]代表行数,[0,1,0]代表列数,即(0,0),(1,1),(2,0)
(3)
x = np.array([[  0,  1,  2],[  3,  4,  5],[  6,  7,  8],[  9,  10,  11]]) 
--->[[ 0  1  2]
     [ 3  4  5]
     [ 6  7  8]
     [ 9 10 11]] 

rows = np.array([[3,3],[0,1],[1,1]]) 
cols = np.array([[0,2],[1,1],[0,0]]) 
y = x[rows,cols]
--->[[ 9 11]     #(3,0)=9,(3,2)=11
     [ 1  4]     #(0,1)=1,(1,1)=4
     [ 3  3]]     #(1,0)=3,(1,0)=3
(4)
1、创建数组
a =np.arange(0,60,10).reshape(-1,1)+np.arange(6)
--->
array([[ 0,  1,  2,  3,  4,  5],
       [10, 11, 12, 13, 14, 15],
       [20, 21, 22, 23, 24, 25],
       [30, 31, 32, 33, 34, 35],
       [40, 41, 42, 43, 44, 45],
       [50, 51, 52, 53, 54, 55]])

2、多维数组的引用
a[(1,2),(1,2)]
--->array([11, 22])

a[3:,(0,2,5)]
--->array([[30, 32, 35],
       [40, 42, 45],
       [50, 52, 55]])

a[0,1] == a[0][1]
--->True
'''布尔索引'''
x = np.array([[  0,  1,  2],[  3,  4,  5],[  6,  7,  8],[  9,  10,  11]]) 
print(x[x > 5])  --->[ 6  7  8  9 10 11]

4、数组的广播

a = np.array([[0.0,0.0,0.0],[10.0,10.0,10.0],[20.0,20.0,20.0],[30.0,30.0,30.0]])      #a数组2维4行3列 
--->[[  0.   0.   0.]
     [ 10.  10.  10.]
     [ 20.  20.  20.]
     [ 30.  30.  30.]]
b = np.array([1.0,2.0,3.0])  --->[ 1.  2.  3.]      #b数组1维1行3列

print(a+b)      #列数相同,行数相同或行数=1   的数组可加减乘除
--->[[  1.   2.   3.]
     [ 11.  12.  13.]
     [ 21.  22.  23.]
     [ 31.  32.  33.]]
图示

5、数组的迭代

'''按单个元素迭代'''
a = np.arange(0,60,5).reshape(4,3)
--->[[ 0  5 10]
     [15 20 25]
     [30 35 40]
     [45 50 55]]

for x in np.nditer(a):        #nditer可以遍历数组元素
    print(x,end = ',')
--->0,5,10,15,20,25,30,35,40,45,50,55,
'''按一维数组迭代'''
for y in np.nditer(a, flags =  ['external_loop'], order ='F'):      #!同上面区别
    print(y)
--->[ 0 15 30 45]
    [ 5 20 35 50]
    [10 25 40 55]
'''对两个数组同时迭代'''
a = np.arange(0,60,5).reshape(4,3)      #同上例的a
b = np.array([1,  2,  3])  

for x,y in np.nditer([a,b]):  
    print  (x,':',y,end='|')
--->0 : 1||5 : 2||10 : 3||15 : 1||20 : 2||25 : 3||30 : 1||35 : 2||40 : 3||45 : 1||50 : 2||55 : 3||
'''迭代过程中可以对元素进行运算'''
for x in np.nditer(a, op_flags=['readwrite']): 
    x[...]=2*x
    print(x,end=',')
--->0,10,20,30,40,50,60,70,80,90,100,110,

6、数组的操作

'''数组大小shape 、 重组数组形状reshape'''
a = np.array([1,2,3,4,5])
c = np.array([[1,2],[5,6],[9,10]])
a.shape  --->  (5,)      
c.shape  --->  (3, 2)

c.shape = 6,1      #重组数组形状 改变原值,第2个参数为-1时将根据数组元素的个数自动计算此轴的长度
--->
array([[ 1],
       [ 2],
       [ 5],
       [ 6],
       [ 9],
       [10]])

c.reshape(3,-1)      #重组数组形状 , 但不改变原值
c --->
array([[ 1],
       [ 2],
       [ 5],
       [ 6],
       [ 9],
       [10]])

d = c.reshape(3,-1)
d
--->
array([[ 1,  2],
       [ 5,  6],
       [ 9, 10]])
---------------------------------------------------------------------------------------------------------
c[0][0] = 100      #注意:改变c的值同样改变d的值
c
--->
array([[100],
       [  2],
       [  5],
       [  6],
       [  9],
       [ 10]])

d
--->
array([[100,   2],
       [  5,   6],
       [  9,  10]])
'''多维数组转一维'''
a = np.arange(8).reshape(2,4)
--->[[0 1 2 3]
     [4 5 6 7]]

a.flatten()  --->[0 1 2 3 4 5 6 7]  #作用 = a.ravel()
a.flat[5]  --->5
'''数组转置'''
a = np.arange(8).reshape(2,4)
--->[[0 1 2 3]
     [4 5 6 7]]

np.transpose(a)      #转置,作用 = a.T
--->[[0 4]
     [1 5]
     [2 6]
     [3 7]]
'''数组按轴翻转'''
a = np.arange(8).reshape(2,2,2)
--->[[[0 1]
     [2 3]]

     [[4 5]
     [6 7]]]

np.rollaxis(a,2,0)      #轴滚动规则:4=a[1][0][0]  --->  4=a[0][1][0]
--->[[[0 2]
     [4 6]]

     [[1 3]
     [5 7]]]

np.swapaxes(a,2,0)      #轴交换规则:1=a[0][0][1]  --->  1=a[1][0][0]把第3个轴和第1个轴交换
--->
array([[[0, 4],
        [2, 6]],

       [[1, 5],
        [3, 7]]])
'''删除一维条目'''
x = np.arange(9).reshape(1,3,3)      #x形状(1,3,3)
--->[[[0 1 2]
     [3 4 5]
     [6 7 8]]]

y = np.squeeze(x)      #删除后y形状(3,3)    
--->[[0 1 2]
     [3 4 5]
     [6 7 8]]
'''数组连接'''
a = np.array([[1,2],[3,4]])
b = np.array([[5,6],[7,8]])

print( np.concatenate((a,b)))      #! 两个数组的维度必须相同
--->[[1 2]
     [3 4]
     [5 6]
     [7 8]]
print( np.concatenate((a,b),axis = 1))      #延轴1连接
--->[[1 2 5 6]
     [3 4 7 8]]
'''数组分割'''
a = np.arange(8)

#必须按等分分割
b = np.split(a,4)  --->[array([0, 1]), array([2, 3]), array([4, 5]), array([6, 7])]

#可以分割出指定的数组
b = np.split(a,[4,7])  --->[array([0, 1, 2, 3]), array([4, 5, 6]), array([7])]
----------------------------------------------------------------------------------------------
A = np.arange(16).reshape(4,4)
--->
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11],
       [12, 13, 14, 15]])

#水平切分,按宽度切分
[B,C] = np.hsplit(A,2)
B
--->
array([[ 0,  1],
       [ 4,  5],
       [ 8,  9],
       [12, 13]])

C
--->
array([[ 2,  3],
       [ 6,  7],
       [10, 11],
       [14, 15]])

#垂直切分,按高度切分
[D,E] = np.vsplit(A,2)
--->
array([[0, 1, 2, 3],
       [4, 5, 6, 7]])

E
--->
array([[ 8,  9, 10, 11],
       [12, 13, 14, 15]])
'''向数组添加数据'''
a = np.array([[1,2,3],[4,5,6]])

#没有提供轴数,原始数组会被展开
print( np.append(a, [7,8,9]))  --->[1 2 3 4 5 6 7 8 9]

#按轴0方向添加
print( np.append(a, [[7,8,9]],axis = 0))
--->[[1 2 3]
     [4 5 6]
     [7 8 9]]

#添加到数组必须和原数组大小相等
print( np.append(a, [[5,5,5],[7,8,9]],axis = 1))
--->[[1 2 3 5 5 5]
     [4 5 6 7 8 9]]
'''向数组插入数据'''
a = np.array([[1,2],[3,4]])

#同append,未传递 Axis 参数。 在插入之前输入数组会被展开
print( np.insert(a,3,[11,12]))
--->[ 1  2  3 11 12  4]

#沿轴 0 广播
print( np.insert(a,1,[11],axis = 0))
--->[[ 1  2]
     [11 11]
     [ 3  4]]

#沿轴 1 广播
print( np.insert(a,1,11,axis = 1))
--->[[ 1 11  2]
     [ 3 11  4]]
'''数组去重复'''
a = np.array([5,2,6,2,7,5,6,8,2,9])

#去重结果:
u = np.unique(a)  --->[2 5 6 7 8 9]

#去重数组的索引数组:
u,indices = np.unique(a, return_index = True)  --->[1 0 2 4 7 9]

#返回去重元素的重复数量:
u,indices = np.unique(a,return_counts = True)
  --->[2 5 6 7 8 9]
     [3 2 2 1 1 1]
'''改变数组中的数值类型'''
a = np.array([1,2,3,4,5])
a.dtype  ---> dtype('int32')

a = np.array([1,2,3,4,5],dtype = np.float)      #dtype = np.complex为复数
a.dtype  --->  array([ 1.,  2.,  3.,  4.,  5.]) dtype('float64')
'''指定数据类型'''
#构建一个数据格式类型元组
student = np.dtype([('name','S20'),  ('age',  'i1'),  ('marks',  'f4')])     
#以元组形式赋值     
a = np.array([('abc',  21,  50),('xyz',  18,  75)], dtype = student)  

print(student)  --->  [('name', 'S20'), ('age', 'i1'), ('marks', '<f4')]
print(a)  --->  [(b'abc', 21,  50.) (b'xyz', 18,  75.)]
'''数组排序,返回值'''
a = np.array([[3,7],[9,1]])  
--->[[3, 7]
     [9, 1]]

np.sort(a)      #默认按a[max]排序,返回值
--->[[3, 7],
     [1, 9]]
np.sort(a,axis = 0)      #按轴0排序
--->[[3, 1],
     [9, 7]]
-------------------------------------------------------------------------------------
'''数组排序,返回索引'''
x = np.array([3,  1,  2])

np.argsort(x)  --->array([1, 2, 0], dtype=int64)      #返回索引值,同上区别
'''对字段排序'''
dt = np.dtype([('name',  'S10'),('age',  int)]) 
a = np.array([("raju",21),("anil",25),("ravi",  17),  ("amar",27)], dtype = dt)

np.sort(a,order = 'age')      #指定需要排序的字段
--->array([(b'ravi', 17), (b'raju', 21), (b'anil', 25), (b'amar', 27)],dtype=[('name', 'S10'), ('age', '<i4')])
'''按条件查找1'''
a = np.array([1.0,5.55,  123,  0.567,  25.532])

#根据条件返回索引
np.where(a>10)  --->(array([2, 4], dtype=int64),)

#根据索引返回值
a[np.where(a>10)]  --->array([ 123.   ,   25.532])

-------------------------------------------------------------------------
'''另一种直接返回值的方法'''
np.extract(a>10,a)  --->array([ 123.   ,   25.532])
'''按条件查找2'''
#条件数组
x = np.array([[  0,  1,  2],[  3,  4,  5],[  6,  7,  8],[  9,  10,  11]]) 
--->[[ 0  1  2]
     [ 3  4  5]
     [ 6  7  8]
     [ 9 10 11]]

#待查找的函数
y = np.random.rand(4,3)
--->[[ 0.58863932  0.30323212  0.69433913]
     [ 0.42826112  0.26868396  0.1792074 ]
     [ 0.27208391  0.66650392  0.05543131]
     [ 0.50812218  0.98126265  0.41180628]]

#简单查找
print(y[x>5])      #等于np.extract(x>5,y)
--->[ 0.27208391  0.66650392  0.05543131  0.50812218  0.98126265  0.41180628]

#!多个并列条件查找,条件之间用&
print(y[(x>5) & (x%2==0)] )
--->[ 0.27208391  0.05543131  0.98126265]

#!多个可选条件查找,条件之间用|
print(y[(x>5) | (x%2==0)] )
--->[ 0.58863932  0.69433913  0.26868396  0.27208391  0.66650392  0.05543131
  0.50812218  0.98126265  0.41180628]

7、数组的算数函数和运算

a = np.array([1.0,5.55,  123,  0.567,  25.532])  

#四舍五入
np.around(a)  --->[   1.    6.  123.    1.   26.]      #默认保留到个位
np.around(a, decimals =  1)  --->[   1.     5.6  123.     0.6   25.5]      #保留1位小数
np.around(a, decimals =  -1)  --->[   0.   10.  120.    0.   30.]      #对个位数四舍五入

#向上取整,即标量x 的下限是最大的整数i ,使得i <= x
np.floor(a)  --->[   1.    5.  123.    0.   25.]

#向下取整,即标量x的上限是最小的整数i ,使得i> = x
print(np.ceil(a))  --->[   1.    6.  123.    1.   26.]
'''求数组倒数'''
a = np.array([0.25,  1.33,  1,  100])  
np.reciprocal(a)  --->[ 4.         0.7518797  1.         0.01     ]

#!对任何大于1的整数求倒数,结果都为0
b = np.array([100], dtype =  int) 
np.reciprocal(b)  --->[0]
'''数组幂运算'''
a = np.array([10,100,1000]) 
np.power(a,2)  --->[    100   10000 1000000] 

b = np.array([1,2,3])  
np.power(a,b)  --->[        10      10000 1000000000]      #两个数组形状必须一致
'''数组求余数'''
a = np.array([10,20,30]) 
b = np.array([3,5,7])  
np.remainder(a,b)  --->[1 0 2]
'''矩阵积'''
A = np.arange(0,9).reshape(3,3)
--->
array([[0, 1, 2],
       [3, 4, 5],
       [6, 7, 8]])

B = np.ones((3,3))
--->
array([[ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.]])

A*B
--->
array([[ 0.,  1.,  2.],
       [ 3.,  4.,  5.],
       [ 6.,  7.,  8.]])
--------------------------------------------------
A.dot(B)
--->
array([[  3.,   3.,   3.],
       [ 12.,  12.,  12.],
       [ 21.,  21.,  21.]])
--------------------------------------------------
B.dot(A)
--->
array([[  9.,  12.,  15.],
       [  9.,  12.,  15.],
       [  9.,  12.,  15.]])
'''矩阵的自增自减'''
A += 1  #减法同理
--->
array([[1, 2, 3],
       [4, 5, 6],
       [7, 8, 9]])

A *= 10
--->
array([[10, 20, 30],
       [40, 50, 60],
       [70, 80, 90]])
'''通用函数'''
np.sqrt(A)
--->
array([[ 3.16227766,  4.47213595,  5.47722558],
       [ 6.32455532,  7.07106781,  7.74596669],
       [ 8.36660027,  8.94427191,  9.48683298]])

np.log(A)
--->
array([[ 2.30258509,  2.99573227,  3.40119738],
       [ 3.68887945,  3.91202301,  4.09434456],
       [ 4.24849524,  4.38202663,  4.49980967]])

np.sin(A)
--->
array([[-0.54402111,  0.91294525, -0.98803162],
       [ 0.74511316, -0.26237485, -0.30481062],
       [ 0.77389068, -0.99388865,  0.89399666]])
'''聚合函数'''
A.sum()  --->450

A.max()  --->90

A.mean()  --->50.0

A.std()  --->25.819888974716111

8、数组的统计函数

'''最大值和最小值,值范围(最大值 - 最小值)'''
a = np.array([[3,7,5],[8,4,3],[2,4,9]])  
--->[[3 7 5]
     [8 4 3]
     [2 4 9]]

np.amin(a)  --->2      #最大值amax(),不指定轴就是对所有值求最小值
np.amin(a,axis = 0)  --->[2 4 3]      #指定0轴,就是按列取最小值

np.ptp(a)  --->7      #求值范围(最大值 - 最小值),即计算(9-2)
np.ptp(a,axis = 0)  --->[6 3 6]      #计算(8-2),(7-4),(9-3)
'''其他统计函数'''
a = np.array([[30,40,70],[80,20,10],[50,90,60]]) 

#求百分位数
np.percentile(a,50)  --->50.0      #计算中位数,可加轴数[axis = ]

#求中值
np.median(a)  --->50.0      #可加轴数[axis = ]

#求算数平均值
np.mean(a)  --->50.0      #可加轴数[axis = ]
a = np.array([1,2,3,4])
#求加权平均值
wts = np.array([8,7,6,5])      #设定权重函数,必须与数组函数同形状,不设定则默认为求平均值
np.average(a,weights = wts)  --->2.3076923076923075      #计算过程:(1*8+2*7+3*6+4*5)/(8+7+6+5)

#方差
np.var(a)  --->1.25

#标准差
np.std(a)  --->1.1180339887498949

9、Matplotlib库

'''例1:基本用法'''
import numpy as np 

#导入Matplotlib库
from matplotlib import pyplot as plt 

#设定x和y
x = np.arange(1,11) 
y = x**2+5

#打印标题
plt.title("Matplotlib demo") 

#打印x轴和y轴标签
plt.xlabel("x axis caption") 
plt.ylabel("y axis caption") 

#设置线段的格式
plt.plot(x,y,'m') 

#输出图表
plt.show()
例1
'''例2:同时绘制多张图表'''
import numpy as np 

#导入Matplotlib库
import matplotlib.pyplot as plt 

# 计算正弦和余弦曲线上的点的 x 和 y 坐标 
x = np.arange(0,  3  * np.pi,  0.1) 
y_sin = np.sin(x) 
y_cos = np.cos(x)  

# 建立 subplot 网格,高为 2,宽为 1  
plt.subplot(2,  1,  1)  

# 绘制第一个图像 
plt.plot(x, y_sin) 
plt.title('Sine')  

# 将第二个 subplot 激活,并绘制第二个图像
plt.subplot(2,  1,  2) 

# 绘制第二个图像
plt.plot(x, y_cos) 
plt.title('Cosine')  

# 展示图像
plt.show()
例2
'''例3:绘制条形图'''
from matplotlib import pyplot as plt 

x =  [5,8,10] 
y =  [12,16,6] 
x2 =  [6,9,11] 
y2 =  [6,15,7] 

#!bar()函数来生成条形图
plt.bar(x, y, align =  'center') 
plt.bar(x2, y2, color =  'g', align =  'center') 

plt.title('Bar graph') 
plt.ylabel('Y axis') 
plt.xlabel('X axis') 
plt.show()
例3

10、数组的文件IO

'''保持为npy格式文件'''
a = np.array([1,2,3,4,5]) 

#保持为npy格式文件
np.save('outfile',a)

#读取npy文件
b = np.load('outfile.npy')
print(b)  --->[1 2 3 4 5]
'''保持为txt格式文件'''
a = np.array([1,2,3,4,5]) 

#保持为npy格式文件
np.savetxt('out.txt',a) 

#读取txt文件
b = np.loadtxt('out.txt')  
print(b)  --->[ 1.  2.  3.  4.  5.]

11、其他

'''赋值区别'''
python中的赋值:
a = [1,2,3,4,5]
b = a[1:3]
b[0] = 10
print(a)  ---> [1, 2, 3, 4, 5]
print(b)  ---> [10, 3]
----------------------------------------------------------------------------------------------
numpy的赋值:
a = np.arange(1,6)
b = a[1:3]
b[0] = 10
print(a)  ---> [1, 10, 3, 4, 5]      #改变b的值,a的值同时改变
print(b)  ---> [10, 3]
'''数组元素的字节单位长度'''

x = np.array([1,2,3,4,5], dtype = np.int8)  
y = np.array([1,2,3,4,5], dtype = np.int32)
z = np.array([1,2,3,4,5], dtype = np.float32)

print("x的字节单位长度:",x.itemsize)  --->  x的字节单位长度: 1
print("y的字节单位长度:",y.itemsize)  --->  y的字节单位长度: 4
print("z的字节单位长度:",z.itemsize)  --->  z的字节单位长度: 4

相关文章

  • Python-numpy库

    1、引入numpy库 2、创建数组 3、数组的基本属性 4、数组切片/索引 4、数组的广播 5、数组的迭代 6、数...

  • Python-numpy

    numpy 基础 函数默认带参: 默认值声明从右向左,参数分配默认从左向右 遇到有些有默认有些无默认,需要将有默认...

  • Python-Numpy基础

    安装 NumPy 如果你已经装有 Anaconda,那么你可以使用以下命令通过终端或命令提示符安装 NumPy:c...

  • Python-Numpy学习1

    安装numpy conda install numpy 或者是 pip install numpy 基础用法 ax...

  • Python-Numpy函数-tile函数

    转载来源:https://www.cnblogs.com/GDUT-xiang/p/5700928.html b ...

  • python-numpy之tile函数

    在机器学习算法KNN讲解中出现np.tile(A,B),其中A为array,B为tuple,例如:(3,2)具体使...

  • python-numpy配置及应用

    1.pycharm 下载 toolbox 2.pip3 brew 3.numpy配置 pip3 install n...

  • 小白怎么开始学python-Numpy数组篇

    数组是python的主角之一,以下会记录数组的创建方法和应用 Numpy——用它来进行数组创建 在开始之前先来了解...

  • [日更挑战-第十八弹]python-numpy初识

    今天带来的是python的一个第三方库 numpy。 numpy 经常是和 matplotlib 结合使用的,适用...

  • 公司数据库逻辑

    pro库 drds库 通道库 查询库 pg库 bi库 tidb库 odps查询 pro库和drds库是线上数据库 ...

网友评论

    本文标题:Python-numpy库

    本文链接:https://www.haomeiwen.com/subject/slvxxftx.html