当前位置:首页>python>【Python】简约而不简单的Numpy小抄表(含主要语法、代码)

【Python】简约而不简单的Numpy小抄表(含主要语法、代码)

  • 2026-06-29 06:42:43
【Python】简约而不简单的Numpy小抄表(含主要语法、代码)

Numpy是一个用python实现的科学计算的扩展程序库,包括:

  • 1、一个强大的N维数组对象Array;

  • 2、比较成熟的(广播)函数库;

  • 3、用于整合C/C++和Fortran代码的工具包;

  • 4、实用的线性代数、傅里叶变换和随机数生成函数。numpy和稀疏矩阵运算包scipy配合使用更加方便。

NumPy(Numeric Python)提供了许多高级的数值编程工具,如:矩阵数据类型、矢量处理,以及精密的运算库。专为进行严格的数字处理而产生。多为很多大型金融公司使用,以及核心的科学计算组织如:Lawrence Livermore,NASA用其处理一些本来使用C++,Fortran或Matlab等所做的任务。

本文整理了一个Numpy的小抄表,总结了Numpy的常用操作,可以收藏慢慢看。

安装Numpy

可以通过 Pip 或者 Anaconda安装Numpy:

$ pip install numpy

$ conda install numpy

本文目录

  1. 基础
    • 占位符
  2. 数组
    • 增加或减少元素
    • 合并数组
    • 分割数组
    • 数组形状变化

    • 拷贝 /排序

    • 数组操作
    • 其他
  3. 数学计算
    • 数学计算
    • 比较
    • 基础统计
    • 更多
  4. 切片和子集
  5. 小技巧

基础

NumPy最常用的功能之一就是NumPy数组:列表和NumPy数组的最主要区别在于功能性和速度。

列表提供基本操作,但NumPy添加了FTTs、卷积、快速搜索、基本统计、线性代数、直方图等。

两者数据科学最重要的区别是能够用NumPy数组进行元素级计算。

axis 0 通常指行

axis 1 通常指列

操作
描述
文档
np.array([1,2,3])一维数组https://numpy.org/doc/stable/reference/generated/numpy.array.html#numpy.array
np.array([(1,2,3),(4,5,6)])二维数组https://numpy.org/doc/stable/reference/generated/numpy.array.html#numpy.array
np.arange(start,stop,step)等差数组
https://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html

占位符

操作
描述
文档
np.linspace(0,2,9)数组中添加等差的值https://docs.scipy.org/doc/numpy/reference/generated/numpy.linspace.html
np.zeros((1,2))创建全0数组docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html
np.ones((1,2))创建全1数组https://docs.scipy.org/doc/numpy/reference/generated/numpy.ones.html#numpy.ones
np.random.random((5,5))创建随机数的数组https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.random.html
np.empty((2,2))创建空数组https://numpy.org/doc/stable/reference/generated/numpy.empty.html

举例:

import numpy as np# 1 dimensionalx = np.array([1,2,3])# 2 dimensionaly = np.array([(1,2,3),(4,5,6)])x = np.arange(3)>>> array([012])y = np.arange(3.0)>>> array([ 0.,  1.,  2.])x = np.arange(3,7)>>> array([3456])y = np.arange(3,7,2)>>> array([35])

数组属性

数组属性

语法
描述
文档
array.shape维度(行,列)https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.shape.html
len(array)数组长度https://docs.python.org/3.5/library/functions.html#len
array.ndim数组的维度数https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.ndim.html
array.size数组的元素数https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.size.html
array.dtype数据类型https://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html
array.astype(type)转换数组类型https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.astype.html
type(array)显示数组类型https://numpy.org/doc/stable/user/basics.types.html

拷贝 /排序

操作
描述
文档
np.copy(array)创建数组拷贝https://docs.scipy.org/doc/numpy/reference/generated/numpy.copy.html
other = array.copy()创建数组深拷贝https://docs.scipy.org/doc/numpy/reference/generated/numpy.copy.html
array.sort()排序一个数组https://docs.scipy.org/doc/numpy/reference/generated/numpy.sort.html
array.sort(axis=0)按照指定轴排序一个数组https://docs.scipy.org/doc/numpy/reference/generated/numpy.sort.html

举例

import numpy as np# Sort sorts in ascending ordery = np.array([10987654321])y.sort()print(y)>>> [ 1  2  3  4  5  6  7  8  9  10]

数组操作例程

增加或减少元素

操作
描述
文档
np.append(a,b)增加数据项到数组https://docs.scipy.org/doc/numpy/reference/generated/numpy.append.html
np.insert(array, 1, 2, axis)沿着数组0轴或者1轴插入数据项https://docs.scipy.org/doc/numpy/reference/generated/numpy.insert.html
np.resize((2,4))将数组调整为形状(2,4)https://docs.scipy.org/doc/numpy/reference/generated/numpy.resize.html
np.delete(array,1,axis)从数组里删除数据项https://numpy.org/doc/stable/reference/generated/numpy.delete.html

举例

import numpy as np# Append items to arraya = np.array([(123),(456)])b = np.append(a, [(789)])print(b)>>> [1 2 3 4 5 6 7 8 9]# Remove index 2 from previous arrayprint(np.delete(b, 2))>>> [1 2 4 5 6 7 8 9]

组合数组

操作
描述
文档
np.concatenate((a,b),axis=0)连接2个数组,添加到末尾https://docs.scipy.org/doc/numpy/reference/generated/numpy.concatenate.html
np.vstack((a,b))按照行堆叠数组https://numpy.org/doc/stable/reference/generated/numpy.vstack.html
np.hstack((a,b))按照列堆叠数组docs.scipy.org/doc/numpy/reference/generated/numpy.hstack.html#numpy.hstack

举例

import numpy as npa = np.array([135])b = np.array([246])# Stack two arrays row-wiseprint(np.vstack((a,b)))>>> [[1 3 5]     [2 4 6]]# Stack two arrays column-wiseprint(np.hstack((a,b)))>>> [1 3 5 2 4 6]

分割数组

操作
描述
文档
numpy.split()分割数组https://docs.scipy.org/doc/numpy/reference/generated/numpy.split.html
np.array_split(array, 3)将数组拆分为大小(几乎)相同的子数组https://docs.scipy.org/doc/numpy/reference/generated/numpy.array_split.html#numpy.array_split
numpy.hsplit(array, 3)在第3个索引处水平拆分数组https://numpy.org/doc/stable/reference/generated/numpy.hsplit.html#numpy.hsplit

举例

# Split array into groups of ~3a = np.array([12345678])print(np.array_split(a, 3))>>> [array([123]), array([456]), array([78])]

数组形状变化

操作
操作
描述
文档
other = ndarray.flatten()平铺一个二维数组到一维数组https://numpy.org/doc/stable/reference/generated/numpy.ndarray.flatten.html
numpy.flip()翻转一维数组中元素的顺序https://docs.scipy.org/doc/stable/reference/generated/numpy.flip.html
np.ndarray[::-1]翻转一维数组中元素的顺序
reshape
改变数组的维数
https://docs.scipy.org/doc/stable/reference/generated/numpy.reshape.html
squeeze从数组的形状中删除单维度条目https://numpy.org/doc/stable/reference/generated/numpy.squeeze.html
expand_dims扩展数组维度https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.expand_dims.html

其他

操作
描述
文档
other = ndarray.flatten()平铺2维数组到1维数组https://numpy.org/doc/stable/reference/generated/numpy.ndarray.flatten.html
array = np.transpose(other)
array.T
数组转置https://numpy.org/doc/stable/reference/generated/numpy.transpose.html
inverse = np.linalg.inv(matrix)求矩阵的逆矩阵https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.inv.html

举例

# Find inverse of a given matrix>>> np.linalg.inv([[3,1],[2,4]])array([[ 0.4, -0.1],       [-0.2,  0.3]])

数学计算

操作

操作
描述
文档
np.add(x,y)
x + y
https://docs.scipy.org/doc/numpy/reference/generated/numpy.add.html
np.substract(x,y)
x - y
https://docs.scipy.org/doc/numpy/reference/generated/numpy.subtract.html#numpy.subtract
np.divide(x,y)
x / y
https://docs.scipy.org/doc/numpy/reference/generated/numpy.divide.html#numpy.divide
np.multiply(x,y)
x * y
https://docs.scipy.org/doc/numpy/reference/generated/numpy.multiply.html#numpy.multiply
np.sqrt(x)平方根https://docs.scipy.org/doc/numpy/reference/generated/numpy.sqrt.html#numpy.sqrt
np.sin(x)元素正弦https://docs.scipy.org/doc/numpy/reference/generated/numpy.sin.html#numpy.sin
np.cos(x)元素余弦https://docs.scipy.org/doc/numpy/reference/generated/numpy.cos.html#numpy.cos
np.log(x)元素自然对数https://docs.scipy.org/doc/numpy/reference/generated/numpy.log.html#numpy.log
np.dot(x,y)点积https://docs.scipy.org/doc/numpy/reference/generated/numpy.dot.html
np.roots([1,0,-4])给定多项式系数的根https://docs.scipy.org/doc/numpy/reference/generated/numpy.roots.html

举例

# If a 1d array is added to a 2d array (or the other way), NumPy# chooses the array with smaller dimension and adds it to the one# with bigger dimensiona = np.array([123])b = np.array([(123), (456)])print(np.add(a, b))>>> [[2 4 6]     [5 7 9]]# Example of np.roots# Consider a polynomial function (x-1)^2 = x^2 - 2*x + 1# Whose roots are 1,1>>> np.roots([1,-2,1])array([1., 1.])# Similarly x^2 - 4 = 0 has roots as x=±2>>> np.roots([1,0,-4])array([-2.,  2.])

比较

操作
描述
文档
==等于https://docs.python.org/2/library/stdtypes.html
!=不等于https://docs.python.org/2/library/stdtypes.html
<< span="">小于https://docs.python.org/2/library/stdtypes.html
>大于https://docs.python.org/2/library/stdtypes.html
<=< span="">小于等于https://docs.python.org/2/library/stdtypes.html
>=大于等于https://docs.python.org/2/library/stdtypes.html
np.array_equal(x,y)数组比较https://numpy.org/doc/stable/reference/generated/numpy.array_equal.html

举例:

# Using comparison operators will create boolean NumPy arraysz = np.array([12345678910])c = z < 6print(c)>>> [ True  True  True  True  True False False False False False]

基本的统计

操作
描述
文档
np.mean(array)Meanhttps://numpy.org/doc/stable/reference/generated/numpy.mean.html#numpy.mean
np.median(array)Medianhttps://numpy.org/doc/stable/reference/generated/numpy.median.html#numpy.median
array.corrcoef()Correlation Coefficienthttps://numpy.org/doc/stable/reference/generated/numpy.corrcoef.html#numpy.corrcoef
np.std(array)Standard Deviationhttps://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html#numpy.std

举例

# Statistics of an arraya = np.array([11258101112])# Standard deviationprint(np.std(a))>>> 4.2938910093294167# Medianprint(np.median(a))>>> 6.5

更多

操作
描述
文档
array.sum()数组求和https://numpy.org/doc/stable/reference/generated/numpy.sum.html
array.min()数组求最小值https://numpy.org/doc/stable/reference/generated/numpy.ndarray.min.html
array.max(axis=0)数组求最大值(沿着0轴)
array.cumsum(axis=0)指定轴求累计和https://numpy.org/doc/stable/reference/generated/numpy.cumsum.html

切片和子集

操作
描述
文档
array[i]索引i处的一维数组https://numpy.org/doc/stable/reference/arrays.indexing.html
array[i,j]索引在[i][j]处的二维数组https://numpy.org/doc/stable/reference/arrays.indexing.html
array[i<4]< span="">布尔索引https://numpy.org/doc/stable/reference/arrays.indexing.html
array[0:3]选择索引为 0, 1和 2https://numpy.org/doc/stable/reference/arrays.indexing.html
array[0:2,1]选择第0,1行,第1列https://numpy.org/doc/stable/reference/arrays.indexing.html
array[:1]选择第0行数据项 (与[0:1, :]相同)https://numpy.org/doc/stable/reference/arrays.indexing.html
array[1:2, :]选择第1行https://numpy.org/doc/stable/reference/arrays.indexing.html
[comment]: <> "array[1,...]等同于 array[1,:,:]
array[ : :-1]反转数组同上

举例

b = np.array([(123), (456)])# The index *before* the comma refers to *rows*,# the index *after* the comma refers to *columns*print(b[0:12])>>> [3]print(b[:len(b), 2])>>> [3 6]print(b[0, :])>>> [1 2 3]print(b[02:])>>> [3]print(b[:, 0])>>> [1 4]c = np.array([(123), (456)])d = c[1:20:2]print(d)>>> [[4 5]]

切片举例

import numpy as npa1 = np.arange(06)a2 = np.arange(1016)a3 = np.arange(2026)a4 = np.arange(3036)a5 = np.arange(4046)a6 = np.arange(5056)a = np.vstack((a1, a2, a3, a4, a5, a6))
生成矩阵和切片图示
技巧

例子将会越来越多的,欢迎大家提交。

布尔索引

# Index trick when working with two np-arraysa = np.array([1,2,3,6,1,4,1])b = np.array([5,6,7,8,3,1,2])# Only saves a at index where b == 1other_a = a[b == 1]#Saves every spot in a except at index where b != 1other_other_a = a[b != 1]
import numpy as npx = np.array([4,6,8,1,2,6,9])y = x > 5print(x[y])>>> [6 8 6 9]# Even shorterx = np.array([1234435212556])print(x[x < 5])>>> [1 2 3 4 4]
【参考】

https://github.com/juliangaal/python-cheat-sheet

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-04 09:35:38 HTTP/2.0 GET : https://f.mffb.com.cn/a/488052.html
  2. 运行时间 : 0.089533s [ 吞吐率:11.17req/s ] 内存消耗:4,982.48kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=2022ca0b5cccbafc618439e13e28f4f2
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000631s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000909s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000361s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000283s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000516s ]
  6. SELECT * FROM `set` [ RunTime:0.000208s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000605s ]
  8. SELECT * FROM `article` WHERE `id` = 488052 LIMIT 1 [ RunTime:0.001025s ]
  9. UPDATE `article` SET `lasttime` = 1783128938 WHERE `id` = 488052 [ RunTime:0.008111s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000264s ]
  11. SELECT * FROM `article` WHERE `id` < 488052 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000469s ]
  12. SELECT * FROM `article` WHERE `id` > 488052 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000429s ]
  13. SELECT * FROM `article` WHERE `id` < 488052 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.005261s ]
  14. SELECT * FROM `article` WHERE `id` < 488052 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001272s ]
  15. SELECT * FROM `article` WHERE `id` < 488052 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.001055s ]
0.091192s