{"id":57714,"date":"2025-08-15T18:09:58","date_gmt":"2025-08-15T10:09:58","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/57714.html"},"modified":"2025-08-15T18:09:58","modified_gmt":"2025-08-15T10:09:58","slug":"%e3%80%90%e5%a4%a7%e6%a8%a1%e5%9e%8b%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e3%80%91%e5%a4%a7%e6%a8%a1%e5%9e%8b%e6%95%b0%e5%ad%a6%e5%85%ac%e5%bc%8f%e4%b8%8epython%e5%ba%93%e6%98%a0%e5%b0%84%e6%8c%87","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/57714.html","title":{"rendered":"\u3010\u5927\u6a21\u578b\u5b66\u4e60\u7b14\u8bb0\u3011\u5927\u6a21\u578b\u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u6620\u5c04\u6307\u5357"},"content":{"rendered":"<p>\u5efa\u8bae\u7ed3\u5408\u4e13\u680f\u6587\u7ae0\u300a\u5927\u6a21\u578b\u57fa\u7840\u6570\u5b66\u539f\u7406\u4e0e\u67b6\u6784\u7684\u5173\u7cfb\u300b\u9605\u8bfb<\/p>\n<h3>\ud83c\udfaf \u67b6\u6784\u603b\u89c8\u56fe\uff1a\u6570\u5b66\u516c\u5f0f \u2192 Python\u5e93\u670d\u52a1\u5173\u7cfb<\/h3>\n<p>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502                        \u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u6620\u5c04\u751f\u6001                           \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>\n                     \u2502                               \u2502<br \/>\n           \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510         \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n           \u2502   \u6df1\u5ea6\u5b66\u4e60\u5e93       \u2502         \u2502   \u673a\u5668\u5b66\u4e60\u5e93        \u2502<br \/>\n           \u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510  \u2502         \u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510     \u2502<br \/>\n           \u2502  \u2502PyTorch      \u2502  \u2502         \u2502  \u2502Scikit-learn\u2502     \u2502<br \/>\n           \u2502  \u2502TensorFlow   \u2502  \u2502         \u2502  \u2502XGBoost     \u2502     \u2502<br \/>\n           \u2502  \u2502JAX          \u2502  \u2502         \u2502  \u2502LightGBM    \u2502     \u2502<br \/>\n           \u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518  \u2502         \u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2518     \u2502<br \/>\n           \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2518         \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2518<br \/>\n                 \u2502         \u2502                    \u2502         \u2502<br \/>\n    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2510    \u2502       \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2510    \u2502<br \/>\n    \u2502 \u7ebf\u6027\u4ee3\u6570\u5e93      \u2502    \u2502       \u2502 \u6982\u7387\u7edf\u8ba1\u5e93       \u2502    \u2502<br \/>\n    \u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510  \u2502    \u2502       \u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510  \u2502    \u2502<br \/>\n    \u2502  \u2502NumPy      \u2502  \u2502    \u2502       \u2502  \u2502SciPy      \u2502  \u2502    \u2502<br \/>\n    \u2502  \u2502SciPy      \u2502  \u2502    \u2502       \u2502  \u2502Statsmodels\u2502  \u2502    \u2502<br \/>\n    \u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2518  \u2502    \u2502       \u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2518  \u2502    \u2502<br \/>\n    \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2518    \u2502       \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2518    \u2502<br \/>\n          \u2502         \u2502      \u2502             \u2502         \u2502      \u2502<br \/>\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502                      \u6570\u5b66\u8ba1\u7b97\u5e93                         \u2502<br \/>\n\u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510        \u2502<br \/>\n\u2502  \u2502SymPy        \u2502  \u2502Matplotlib   \u2502  \u2502Pandas       \u2502        \u2502<br \/>\n\u2502  \u2502\u7b26\u53f7\u8ba1\u7b97     \u2502  \u2502\u53ef\u89c6\u5316       \u2502  \u2502\u6570\u636e\u5904\u7406     \u2502        \u2502<br \/>\n\u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518  \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518  \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518        \u2502<br \/>\n\u2502        \u2502                \u2502                \u2502                 \u2502<br \/>\n\u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510      \u2502<br \/>\n\u2502  \u2502 \u4f18\u5316\u5e93       \u2502  \u4fe1\u53f7\u5904\u7406      \u2502  \u6570\u503c\u8ba1\u7b97      \u2502      \u2502<br \/>\n\u2502  \u2502\u00b7SciPy\u4f18\u5316   \u2502  \u00b7SciPy\u4fe1\u53f7   \u2502  \u00b7NumPy       \u2502      \u2502<br \/>\n\u2502  \u2502\u00b7CVXPY       \u2502  \u00b7PyWavelets  \u2502  \u00b7Numba       \u2502      \u2502<br \/>\n\u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518  \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518  \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518      \u2502<br \/>\n\u2502        \u2502                \u2502                \u2502               \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>\n         \u2502<br \/>\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502                      \u57fa\u7840\u6570\u5b66\u516c\u5f0f\u5c42                         \u2502<br \/>\n\u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510          \u2502<br \/>\n\u2502  \u2502 \u5fae\u79ef\u5206\u516c\u5f0f   \u2502  \u2502 \u7ebf\u6027\u4ee3\u6570     \u2502  \u2502 \u6982\u7387\u7edf\u8ba1     \u2502          \u2502<br \/>\n\u2502  \u2502\u00b7\u68af\u5ea6\u4e0b\u964d    \u2502  \u2502\u00b7\u77e9\u9635\u5206\u89e3     \u2502  \u2502\u00b7\u8d1d\u53f6\u65af\u5b9a\u7406   \u2502          \u2502<br \/>\n\u2502  \u2502\u00b7\u94fe\u5f0f\u6cd5\u5219    \u2502  \u2502\u00b7\u7279\u5f81\u503c\u5206\u89e3   \u2502  \u2502\u00b7\u6700\u5927\u4f3c\u7136     \u2502          \u2502<br \/>\n\u2502  \u2502\u00b7\u6cf0\u52d2\u5c55\u5f00    \u2502  \u2502\u00b7SVD\u5206\u89e3     \u2502  \u2502\u00b7KL\u6563\u5ea6       \u2502          \u2502<br \/>\n\u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518  \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518  \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518          \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/p>\n<h3>\ud83d\udcca \u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u51fd\u6570\u6620\u5c04\u8868<\/h3>\n<h4>\ud83d\udd22 \u5fae\u79ef\u5206\u516c\u5f0f\u6620\u5c04<\/h4>\n<table>\n<tr>\n   \u6570\u5b66\u516c\u5f0f<br \/>\n   Python\u5b9e\u73b0<br \/>\n   \u6240\u5c5e\u5e93<br \/>\n   \u51fd\u6570\/\u7c7b<br \/>\n   \u5e94\u7528\u573a\u666f<br \/>\n  <\/tr>\n<tbody>\n<tr>\n<td>\u68af\u5ea6\u4e0b\u964d<\/td>\n<td>torch.optim.SGD<\/td>\n<td>PyTorch<\/td>\n<td>optim.SGD(params, lr=0.01)<\/td>\n<td>\u795e\u7ecf\u7f51\u7edc\u8bad\u7ec3<\/td>\n<\/tr>\n<tr>\n<td>\u94fe\u5f0f\u6cd5\u5219<\/td>\n<td>torch.autograd<\/td>\n<td>PyTorch<\/td>\n<td>loss.backward()<\/td>\n<td>\u53cd\u5411\u4f20\u64ad<\/td>\n<\/tr>\n<tr>\n<td>\u6cf0\u52d2\u5c55\u5f00<\/td>\n<td>scipy.interpolate.taylor<\/td>\n<td>SciPy<\/td>\n<td>taylor(func, x0, n)<\/td>\n<td>\u51fd\u6570\u8fd1\u4f3c<\/td>\n<\/tr>\n<tr>\n<td>\u504f\u5bfc\u6570<\/td>\n<td>torch.autograd.grad<\/td>\n<td>PyTorch<\/td>\n<td>torch.autograd.grad(outputs, inputs)<\/td>\n<td>\u9ad8\u9636\u68af\u5ea6<\/td>\n<\/tr>\n<tr>\n<td>\u62c9\u683c\u6717\u65e5\u4e58\u5b50<\/td>\n<td>scipy.optimize.minimize<\/td>\n<td>SciPy<\/td>\n<td>minimize(fun, x0, method=\\&#8217;SLSQP\\&#8217;, constraints=&#8230;)<\/td>\n<td>\u7ea6\u675f\u4f18\u5316<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\ud83c\udfaf \u7ebf\u6027\u4ee3\u6570\u516c\u5f0f\u6620\u5c04<\/h4>\n<table>\n<tr>\n   \u6570\u5b66\u516c\u5f0f<br \/>\n   Python\u5b9e\u73b0<br \/>\n   \u6240\u5c5e\u5e93<br \/>\n   \u51fd\u6570\/\u7c7b<br \/>\n   \u5e94\u7528\u573a\u666f<br \/>\n  <\/tr>\n<tbody>\n<tr>\n<td>\u77e9\u9635\u4e58\u6cd5<\/td>\n<td>torch.matmul<\/td>\n<td>PyTorch<\/td>\n<td>torch.matmul(A, B)<\/td>\n<td>\u5168\u8fde\u63a5\u5c42\u8ba1\u7b97<\/td>\n<\/tr>\n<tr>\n<td>\u7279\u5f81\u503c\u5206\u89e3<\/td>\n<td>torch.linalg.eig<\/td>\n<td>PyTorch<\/td>\n<td>torch.linalg.eig(A)<\/td>\n<td>PCA\u964d\u7ef4<\/td>\n<\/tr>\n<tr>\n<td>SVD\u5206\u89e3<\/td>\n<td>torch.linalg.svd<\/td>\n<td>PyTorch<\/td>\n<td>torch.linalg.svd(A)<\/td>\n<td>\u63a8\u8350\u7cfb\u7edf<\/td>\n<\/tr>\n<tr>\n<td>\u77e9\u9635\u6c42\u9006<\/td>\n<td>torch.linalg.inv<\/td>\n<td>PyTorch<\/td>\n<td>torch.linalg.inv(A)<\/td>\n<td>\u7ebf\u6027\u56de\u5f52\u89e3\u6790\u89e3<\/td>\n<\/tr>\n<tr>\n<td>\u6b63\u4ea4\u6295\u5f71<\/td>\n<td>numpy.linalg.qr<\/td>\n<td>NumPy<\/td>\n<td>np.linalg.qr(A)<\/td>\n<td>\u6b63\u4ea4\u5316<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\ud83d\udcc8 \u6982\u7387\u7edf\u8ba1\u516c\u5f0f\u6620\u5c04<\/h4>\n<table>\n<tr>\n   \u6570\u5b66\u516c\u5f0f<br \/>\n   Python\u5b9e\u73b0<br \/>\n   \u6240\u5c5e\u5e93<br \/>\n   \u51fd\u6570\/\u7c7b<br \/>\n   \u5e94\u7528\u573a\u666f<br \/>\n  <\/tr>\n<tbody>\n<tr>\n<td>\u8d1d\u53f6\u65af\u5b9a\u7406<\/td>\n<td>scipy.stats.bayes_mvs<\/td>\n<td>SciPy<\/td>\n<td>bayes_mvs(data, alpha=0.05)<\/td>\n<td>\u53c2\u6570\u4f30\u8ba1<\/td>\n<\/tr>\n<tr>\n<td>\u6700\u5927\u4f3c\u7136\u4f30\u8ba1<\/td>\n<td>scipy.stats.fit<\/td>\n<td>SciPy<\/td>\n<td>norm.fit(data)<\/td>\n<td>\u5206\u5e03\u62df\u5408<\/td>\n<\/tr>\n<tr>\n<td>KL\u6563\u5ea6<\/td>\n<td>torch.nn.KLDivLoss<\/td>\n<td>PyTorch<\/td>\n<td>nn.KLDivLoss()<\/td>\n<td>\u77e5\u8bc6\u84b8\u998f<\/td>\n<\/tr>\n<tr>\n<td>\u9ad8\u65af\u5206\u5e03<\/td>\n<td>torch.distributions.Normal<\/td>\n<td>PyTorch<\/td>\n<td>Normal(loc, scale)<\/td>\n<td>\u53d8\u5206\u81ea\u7f16\u7801\u5668<\/td>\n<\/tr>\n<tr>\n<td>\u4ea4\u53c9\u71b5<\/td>\n<td>torch.nn.CrossEntropyLoss<\/td>\n<td>PyTorch<\/td>\n<td>nn.CrossEntropyLoss()<\/td>\n<td>\u5206\u7c7b\u635f\u5931<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\ud83d\udd0d \u4f18\u5316\u7b97\u6cd5\u6620\u5c04<\/h4>\n<table>\n<tr>\n   \u7b97\u6cd5\u540d\u79f0<br \/>\n   \u6570\u5b66\u516c\u5f0f<br \/>\n   Python\u5b9e\u73b0<br \/>\n   \u6240\u5c5e\u5e93<br \/>\n   \u5e94\u7528\u573a\u666f<br \/>\n  <\/tr>\n<tbody>\n<tr>\n<td>Adam\u4f18\u5316\u5668<\/td>\n<td>m_t = \u03b21*m_{t-1} + (1-\u03b21)*g_t<\/td>\n<td>torch.optim.Adam<\/td>\n<td>PyTorch<\/td>\n<td>\u6df1\u5ea6\u5b66\u4e60\u8bad\u7ec3<\/td>\n<\/tr>\n<tr>\n<td>RMSprop<\/td>\n<td>v_t = \u03b2*v_{t-1} + (1-\u03b2)*g_t\u00b2<\/td>\n<td>torch.optim.RMSprop<\/td>\n<td>PyTorch<\/td>\n<td>RNN\u8bad\u7ec3<\/td>\n<\/tr>\n<tr>\n<td>L-BFGS<\/td>\n<td>\u62df\u725b\u987f\u6cd5<\/td>\n<td>scipy.optimize.minimize<\/td>\n<td>SciPy<\/td>\n<td>\u5c0f\u89c4\u6a21\u4f18\u5316<\/td>\n<\/tr>\n<tr>\n<td>SGD<\/td>\n<td>\u03b8 = \u03b8 &#8211; \u03b1*\u2207J(\u03b8)<\/td>\n<td>torch.optim.SGD<\/td>\n<td>PyTorch<\/td>\n<td>\u57fa\u7840\u68af\u5ea6\u4e0b\u964d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\ud83c\udfd7\ufe0f \u5e93\u95f4\u670d\u52a1\u5173\u7cfb\u67b6\u6784\u56fe<\/h3>\n<h4>1\ufe0f\u20e3 \u6838\u5fc3\u6df1\u5ea6\u5b66\u4e60\u5e93\u670d\u52a1\u94fe<\/h4>\n<p>PyTorch\/TensorFlow \u2190 NumPy \u2190 \u57fa\u7840\u6570\u5b66<br \/>\n    \u2193<br \/>\n\u81ea\u52a8\u5fae\u5206 \u2190 \u94fe\u5f0f\u6cd5\u5219<br \/>\n    \u2193<br \/>\n\u4f18\u5316\u5668 \u2190 \u68af\u5ea6\u4e0b\u964d\u7b97\u6cd5<br \/>\n    \u2193<br \/>\n\u795e\u7ecf\u7f51\u7edc\u5c42 \u2190 \u7ebf\u6027\u4ee3\u6570\u8fd0\u7b97<\/p>\n<h4>2\ufe0f\u20e3 \u673a\u5668\u5b66\u4e60\u5e93\u670d\u52a1\u5173\u7cfb<\/h4>\n<p>Scikit-learn<br \/>\n    \u251c\u2500\u2500 \u4f7f\u7528NumPy\u8fdb\u884c\u77e9\u9635\u8fd0\u7b97<br \/>\n    \u251c\u2500\u2500 \u4f7f\u7528SciPy\u8fdb\u884c\u4f18\u5316<br \/>\n    \u251c\u2500\u2500 \u4f7f\u7528Matplotlib\u53ef\u89c6\u5316<br \/>\n    \u2514\u2500\u2500 \u63d0\u4f9b\u9ad8\u5c42API\u5c01\u88c5<\/p>\n<p>XGBoost\/LightGBM<br \/>\n    \u251c\u2500\u2500 \u4f7f\u7528C++\u5e95\u5c42\u4f18\u5316<br \/>\n    \u251c\u2500\u2500 \u63d0\u4f9bPython\u63a5\u53e3<br \/>\n    \u2514\u2500\u2500 \u96c6\u6210NumPy\u6570\u7ec4\u5904\u7406<\/p>\n<h4>3\ufe0f\u20e3 \u6570\u5b66\u8ba1\u7b97\u5e93\u5c42\u7ea7<\/h4>\n<p>\u57fa\u7840\u5c42\uff1aNumPy<br \/>\n    \u251c\u2500\u2500 \u6570\u7ec4\u64cd\u4f5c<br \/>\n    \u251c\u2500\u2500 \u7ebf\u6027\u4ee3\u6570<br \/>\n    \u2514\u2500\u2500 \u968f\u673a\u6570\u751f\u6210<\/p>\n<p>\u4e2d\u95f4\u5c42\uff1aSciPy<br \/>\n    \u251c\u2500\u2500 \u4f18\u5316\u7b97\u6cd5<br \/>\n    \u251c\u2500\u2500 \u7edf\u8ba1\u5206\u5e03<br \/>\n    \u2514\u2500\u2500 \u4fe1\u53f7\u5904\u7406<\/p>\n<p>\u9ad8\u7ea7\u5c42\uff1aPyTorch\/TensorFlow<br \/>\n    \u251c\u2500\u2500 \u81ea\u52a8\u5fae\u5206<br \/>\n    \u251c\u2500\u2500 GPU\u52a0\u901f<br \/>\n    \u2514\u2500\u2500 \u6df1\u5ea6\u5b66\u4e60\u6a21\u578b<\/p>\n<h3>\ud83d\udccb \u5177\u4f53\u5b9e\u73b0\u4ee3\u7801\u6620\u5c04<\/h3>\n<h4>\ud83c\udfaf 1. \u7ebf\u6027\u56de\u5f52\uff08\u6700\u5c0f\u4e8c\u4e58\u6cd5\uff09<\/h4>\n<p>\u6570\u5b66\u516c\u5f0f\uff1a<\/p>\n<p><span class=\"token comment\"># \u6b63\u89c4\u65b9\u7a0b\uff1a\u03b8 = (X^T X)^(-1) X^T y<\/span><\/p>\n<p>Python\u5b9e\u73b0\u6620\u5c04\uff1a<\/p>\n<p><span class=\"token keyword\">import<\/span> numpy <span class=\"token keyword\">as<\/span> np<br \/>\n<span class=\"token keyword\">from<\/span> sklearn<span class=\"token punctuation\">.<\/span>linear_model <span class=\"token keyword\">import<\/span> LinearRegression<\/p>\n<p><span class=\"token comment\"># NumPy\u539f\u751f\u5b9e\u73b0<\/span><br \/>\nX <span class=\"token operator\">=<\/span> np<span class=\"token punctuation\">.<\/span>array<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">3<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><br \/>\ny <span class=\"token operator\">=<\/span> np<span class=\"token punctuation\">.<\/span>array<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">[<\/span><span class=\"token number\">6<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">8<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">9<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">11<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><br \/>\ntheta <span class=\"token operator\">=<\/span> np<span class=\"token punctuation\">.<\/span>linalg<span class=\"token punctuation\">.<\/span>inv<span class=\"token punctuation\">(<\/span>X<span class=\"token punctuation\">.<\/span>T @ X<span class=\"token punctuation\">)<\/span> @ X<span class=\"token punctuation\">.<\/span>T @ y<\/p>\n<p><span class=\"token comment\"># Scikit-learn\u5c01\u88c5<\/span><br \/>\nmodel <span class=\"token operator\">=<\/span> LinearRegression<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\nmodel<span class=\"token punctuation\">.<\/span>fit<span class=\"token punctuation\">(<\/span>X<span class=\"token punctuation\">,<\/span> y<span class=\"token punctuation\">)<\/span><\/p>\n<h4>\ud83c\udfaf 2. \u4e3b\u6210\u5206\u5206\u6790\uff08PCA\uff09<\/h4>\n<p>\u6570\u5b66\u516c\u5f0f\uff1a<\/p>\n<p><span class=\"token comment\"># \u7279\u5f81\u503c\u5206\u89e3\uff1aC = Q\u039bQ^T<\/span><\/p>\n<p>Python\u5b9e\u73b0\u6620\u5c04\uff1a<\/p>\n<p><span class=\"token keyword\">from<\/span> sklearn<span class=\"token punctuation\">.<\/span>decomposition <span class=\"token keyword\">import<\/span> PCA<br \/>\n<span class=\"token keyword\">from<\/span> sklearn<span class=\"token punctuation\">.<\/span>preprocessing <span class=\"token keyword\">import<\/span> StandardScaler<\/p>\n<p><span class=\"token comment\"># \u624b\u52a8\u5b9e\u73b0<\/span><br \/>\nX_std <span class=\"token operator\">=<\/span> StandardScaler<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>fit_transform<span class=\"token punctuation\">(<\/span>X<span class=\"token punctuation\">)<\/span><br \/>\ncov_matrix <span class=\"token operator\">=<\/span> np<span class=\"token punctuation\">.<\/span>cov<span class=\"token punctuation\">(<\/span>X_std<span class=\"token punctuation\">.<\/span>T<span class=\"token punctuation\">)<\/span><br \/>\neigenvalues<span class=\"token punctuation\">,<\/span> eigenvectors <span class=\"token operator\">=<\/span> np<span class=\"token punctuation\">.<\/span>linalg<span class=\"token punctuation\">.<\/span>eig<span class=\"token punctuation\">(<\/span>cov_matrix<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># Scikit-learn\u5c01\u88c5<\/span><br \/>\npca <span class=\"token operator\">=<\/span> PCA<span class=\"token punctuation\">(<\/span>n_components<span class=\"token operator\">=<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span><br \/>\nX_pca <span class=\"token operator\">=<\/span> pca<span class=\"token punctuation\">.<\/span>fit_transform<span class=\"token punctuation\">(<\/span>X<span class=\"token punctuation\">)<\/span><\/p>\n<h4>\ud83c\udfaf 3. \u795e\u7ecf\u7f51\u7edc\u53cd\u5411\u4f20\u64ad<\/h4>\n<p>\u6570\u5b66\u516c\u5f0f\uff1a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb709\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf5\u6b21\u3002\u672c\u6587\u7cfb\u7edf\u68b3\u7406\u4e86\u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u7684\u6620\u5c04\u5173\u7cfb\uff0c\u6784\u5efa\u4e86\u5b8c\u6574\u7684\u6570\u5b66\u8ba1\u7b97\u6280\u672f\u6808\u3002\u67b6\u6784\u56fe\u5c55\u793a\u4e86\u4ece\u57fa\u7840\u6570\u5b66\u516c\u5f0f\u5c42\u5230Python\u5e93\u7684\u5b8c\u6574\u751f\u6001\uff1a\u5e95\u5c42\u662f\u5fae\u79ef\u5206\u3001\u7ebf\u6027\u4ee3\u6570\u548c\u6982\u7387\u7edf\u8ba1\u7b49\u6570\u5b66\u57fa\u7840\uff1b\u4e2d\u95f4\u5c42\u4e3aNumPy\u3001SciPy\u7b49\u6570\u5b66\u8ba1\u7b97\u5e93\uff1b\u4e0a\u5c42\u662fPyTorch\u3001Scikit-learn\u7b49\u6df1\u5ea6\u5b66\u4e60\u548c\u673a\u5668\u5b66\u4e60\u5e93\u3002\u6587\u4e2d\u8be6\u7ec6\u5217\u51fa\u4e86\u5404\u7c7b\u6570\u5b66\u516c\u5f0f\uff08\u68af\u5ea6\u4e0b\u964d\u3001\u77e9\u9635\u5206\u89e3\u3001\u8d1d\u53f6\u65af\u5b9a\u7406\u7b49\uff09\u5728\u4e0d\u540cPython\u5e93\u4e2d\u7684\u5177\u4f53\u5b9e\u73b0\uff0c\u5305\u62ec\u51fd\u6570\u540d\u548c\u5e94\u7528\u573a\u666f\u3002\u540c\u65f6\u5c55\u793a\u4e86\u5e93\u95f4\u670d\u52a1\u5173\u7cfb\uff0c\u5982\u6df1\u5ea6\u5b66\u4e60\u5e93\u4f9d\u8d56NumPy\u8fdb\u884c\u77e9\u9635\u8fd0\u7b97\uff0c\u673a\u5668\u5b66\u4e60\u5e93\u96c6\u6210SciPy\u4f18\u5316\u7b49\u529f\u80fd\u3002\u8be5<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[66,81,6064,371,305],"topic":[],"class_list":["post-57714","post","type-post","status-publish","format-standard","hentry","category-server","tag-ai","tag-python","tag-6064","tag-371","tag-305"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010\u5927\u6a21\u578b\u5b66\u4e60\u7b14\u8bb0\u3011\u5927\u6a21\u578b\u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u6620\u5c04\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/57714.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u5927\u6a21\u578b\u5b66\u4e60\u7b14\u8bb0\u3011\u5927\u6a21\u578b\u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u6620\u5c04\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb709\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf5\u6b21\u3002\u672c\u6587\u7cfb\u7edf\u68b3\u7406\u4e86\u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u7684\u6620\u5c04\u5173\u7cfb\uff0c\u6784\u5efa\u4e86\u5b8c\u6574\u7684\u6570\u5b66\u8ba1\u7b97\u6280\u672f\u6808\u3002\u67b6\u6784\u56fe\u5c55\u793a\u4e86\u4ece\u57fa\u7840\u6570\u5b66\u516c\u5f0f\u5c42\u5230Python\u5e93\u7684\u5b8c\u6574\u751f\u6001\uff1a\u5e95\u5c42\u662f\u5fae\u79ef\u5206\u3001\u7ebf\u6027\u4ee3\u6570\u548c\u6982\u7387\u7edf\u8ba1\u7b49\u6570\u5b66\u57fa\u7840\uff1b\u4e2d\u95f4\u5c42\u4e3aNumPy\u3001SciPy\u7b49\u6570\u5b66\u8ba1\u7b97\u5e93\uff1b\u4e0a\u5c42\u662fPyTorch\u3001Scikit-learn\u7b49\u6df1\u5ea6\u5b66\u4e60\u548c\u673a\u5668\u5b66\u4e60\u5e93\u3002\u6587\u4e2d\u8be6\u7ec6\u5217\u51fa\u4e86\u5404\u7c7b\u6570\u5b66\u516c\u5f0f\uff08\u68af\u5ea6\u4e0b\u964d\u3001\u77e9\u9635\u5206\u89e3\u3001\u8d1d\u53f6\u65af\u5b9a\u7406\u7b49\uff09\u5728\u4e0d\u540cPython\u5e93\u4e2d\u7684\u5177\u4f53\u5b9e\u73b0\uff0c\u5305\u62ec\u51fd\u6570\u540d\u548c\u5e94\u7528\u573a\u666f\u3002\u540c\u65f6\u5c55\u793a\u4e86\u5e93\u95f4\u670d\u52a1\u5173\u7cfb\uff0c\u5982\u6df1\u5ea6\u5b66\u4e60\u5e93\u4f9d\u8d56NumPy\u8fdb\u884c\u77e9\u9635\u8fd0\u7b97\uff0c\u673a\u5668\u5b66\u4e60\u5e93\u96c6\u6210SciPy\u4f18\u5316\u7b49\u529f\u80fd\u3002\u8be5\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/57714.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-15T10:09:58+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/57714.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/57714.html\",\"name\":\"\u3010\u5927\u6a21\u578b\u5b66\u4e60\u7b14\u8bb0\u3011\u5927\u6a21\u578b\u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u6620\u5c04\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-15T10:09:58+00:00\",\"dateModified\":\"2025-08-15T10:09:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/57714.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/57714.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/57714.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u5927\u6a21\u578b\u5b66\u4e60\u7b14\u8bb0\u3011\u5927\u6a21\u578b\u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u6620\u5c04\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010\u5927\u6a21\u578b\u5b66\u4e60\u7b14\u8bb0\u3011\u5927\u6a21\u578b\u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u6620\u5c04\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/57714.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010\u5927\u6a21\u578b\u5b66\u4e60\u7b14\u8bb0\u3011\u5927\u6a21\u578b\u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u6620\u5c04\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb709\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf5\u6b21\u3002\u672c\u6587\u7cfb\u7edf\u68b3\u7406\u4e86\u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u7684\u6620\u5c04\u5173\u7cfb\uff0c\u6784\u5efa\u4e86\u5b8c\u6574\u7684\u6570\u5b66\u8ba1\u7b97\u6280\u672f\u6808\u3002\u67b6\u6784\u56fe\u5c55\u793a\u4e86\u4ece\u57fa\u7840\u6570\u5b66\u516c\u5f0f\u5c42\u5230Python\u5e93\u7684\u5b8c\u6574\u751f\u6001\uff1a\u5e95\u5c42\u662f\u5fae\u79ef\u5206\u3001\u7ebf\u6027\u4ee3\u6570\u548c\u6982\u7387\u7edf\u8ba1\u7b49\u6570\u5b66\u57fa\u7840\uff1b\u4e2d\u95f4\u5c42\u4e3aNumPy\u3001SciPy\u7b49\u6570\u5b66\u8ba1\u7b97\u5e93\uff1b\u4e0a\u5c42\u662fPyTorch\u3001Scikit-learn\u7b49\u6df1\u5ea6\u5b66\u4e60\u548c\u673a\u5668\u5b66\u4e60\u5e93\u3002\u6587\u4e2d\u8be6\u7ec6\u5217\u51fa\u4e86\u5404\u7c7b\u6570\u5b66\u516c\u5f0f\uff08\u68af\u5ea6\u4e0b\u964d\u3001\u77e9\u9635\u5206\u89e3\u3001\u8d1d\u53f6\u65af\u5b9a\u7406\u7b49\uff09\u5728\u4e0d\u540cPython\u5e93\u4e2d\u7684\u5177\u4f53\u5b9e\u73b0\uff0c\u5305\u62ec\u51fd\u6570\u540d\u548c\u5e94\u7528\u573a\u666f\u3002\u540c\u65f6\u5c55\u793a\u4e86\u5e93\u95f4\u670d\u52a1\u5173\u7cfb\uff0c\u5982\u6df1\u5ea6\u5b66\u4e60\u5e93\u4f9d\u8d56NumPy\u8fdb\u884c\u77e9\u9635\u8fd0\u7b97\uff0c\u673a\u5668\u5b66\u4e60\u5e93\u96c6\u6210SciPy\u4f18\u5316\u7b49\u529f\u80fd\u3002\u8be5","og_url":"https:\/\/www.wsisp.com\/helps\/57714.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-15T10:09:58+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/57714.html","url":"https:\/\/www.wsisp.com\/helps\/57714.html","name":"\u3010\u5927\u6a21\u578b\u5b66\u4e60\u7b14\u8bb0\u3011\u5927\u6a21\u578b\u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u6620\u5c04\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-15T10:09:58+00:00","dateModified":"2025-08-15T10:09:58+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/57714.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/57714.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/57714.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010\u5927\u6a21\u578b\u5b66\u4e60\u7b14\u8bb0\u3011\u5927\u6a21\u578b\u6570\u5b66\u516c\u5f0f\u4e0ePython\u5e93\u6620\u5c04\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/57714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=57714"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/57714\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=57714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=57714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=57714"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=57714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}