{"id":1109142,"date":"2025-01-08T17:07:23","date_gmt":"2025-01-08T09:07:23","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1109142.html"},"modified":"2025-01-08T17:07:26","modified_gmt":"2025-01-08T09:07:26","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e5%b0%86%e5%9b%9b%e5%85%83%e6%95%b0%e8%bd%ac%e5%8c%96","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1109142.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u5c06\u56db\u5143\u6570\u8f6c\u5316"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25072523\/5ecd4e94-e3d2-49a3-92cd-603a658402b4.webp\" alt=\"python\u4e2d\u5982\u4f55\u5c06\u56db\u5143\u6570\u8f6c\u5316\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u56db\u5143\u6570\uff08Quaternion\uff09\u662f\u4e00\u79cd\u7528\u6765\u8868\u793a\u4e09\u7ef4\u7a7a\u95f4\u65cb\u8f6c\u7684\u6570\u5b66\u5de5\u5177\u3002<\/strong>\u3001<strong>\u56db\u5143\u6570\u8f6c\u6362\u53ef\u4ee5\u901a\u8fc7\u51e0\u4e2a\u6b65\u9aa4\u5b9e\u73b0\uff1a<\/strong>\u3001<strong>\u4f7f\u7528scipy\u5e93\u548cnumpy\u5e93\u80fd\u591f\u7b80\u5316\u8fd9\u4e2a\u8fc7\u7a0b\u3002<\/strong>\u3001<strong>\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u89e3\u91ca\u548c\u793a\u4f8b\u4ee3\u7801\u3002<\/strong> <strong>\u6211\u4eec\u5c06\u901a\u8fc7\u5b9a\u4e49\u56db\u5143\u6570\u7c7b\u3001\u5b9e\u73b0\u57fa\u672c\u7684\u56db\u5143\u6570\u64cd\u4f5c\u4ee5\u53ca\u5c55\u793a\u5982\u4f55\u5c06\u56db\u5143\u6570\u8f6c\u6362\u6210\u65cb\u8f6c\u77e9\u9635\u3001\u6b27\u62c9\u89d2\u548c\u8f74\u89d2\u8868\u793a\u3002<\/strong><\/p>\n<\/p>\n<p><p><strong>\u56db\u5143\u6570\u8f6c\u6362\u7684\u57fa\u672c\u64cd\u4f5c<\/strong><\/p>\n<\/p>\n<p><p>\u56db\u5143\u6570\u662f\u7531\u4e00\u4e2a\u5b9e\u90e8\u548c\u4e09\u4e2a\u865a\u90e8\u7ec4\u6210\u7684\u590d\u6570\uff0c\u901a\u5e38\u8868\u793a\u4e3a q = w + xi + yj + zk\uff0c\u5176\u4e2dw, x, y, z\u662f\u5b9e\u6570\u3002\u56db\u5143\u6570\u53ef\u4ee5\u7528\u4e8e\u8868\u793a\u548c\u8ba1\u7b97\u4e09\u7ef4\u65cb\u8f6c\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u56db\u5143\u6570\u7684\u8f6c\u6362\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b9a\u4e49\u56db\u5143\u6570\u7c7b<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u66f4\u65b9\u4fbf\u5730\u64cd\u4f5c\u56db\u5143\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u4e00\u4e2a\u56db\u5143\u6570\u7c7b\u3002\u8fd9\u4e2a\u7c7b\u5c06\u5305\u542b\u8868\u793a\u56db\u5143\u6570\u7684\u57fa\u672c\u5c5e\u6027\u548c\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>class Quaternion:<\/p>\n<p>    def __init__(self, w, x, y, z):<\/p>\n<p>        self.w = w<\/p>\n<p>        self.x = x<\/p>\n<p>        self.y = y<\/p>\n<p>        self.z = z<\/p>\n<p>    def __repr__(self):<\/p>\n<p>        return f&quot;Quaternion({self.w}, {self.x}, {self.y}, {self.z})&quot;<\/p>\n<p>    def to_array(self):<\/p>\n<p>        return np.array([self.w, self.x, self.y, self.z])<\/p>\n<p>    def norm(self):<\/p>\n<p>        return np.sqrt(self.w&lt;strong&gt;2 + self.x&lt;\/strong&gt;2 + self.y&lt;strong&gt;2 + self.z&lt;\/strong&gt;2)<\/p>\n<p>    def normalize(self):<\/p>\n<p>        n = self.norm()<\/p>\n<p>        self.w \/= n<\/p>\n<p>        self.x \/= n<\/p>\n<p>        self.y \/= n<\/p>\n<p>        self.z \/= n<\/p>\n<p>        return self<\/p>\n<p>    def conjugate(self):<\/p>\n<p>        return Quaternion(self.w, -self.x, -self.y, -self.z)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u56db\u5143\u6570\u4e58\u6cd5<\/h3>\n<\/p>\n<p><p>\u56db\u5143\u6570\u7684\u4e58\u6cd5\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u64cd\u4f5c\uff0c\u7528\u4e8e\u7ec4\u5408\u65cb\u8f6c\u3002\u56db\u5143\u6570\u7684\u4e58\u6cd5\u4e0d\u662f\u4ea4\u6362\u7684\uff0c\u5373 q1 * q2 \u2260 q2 * q1\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def quaternion_multiply(q1, q2):<\/p>\n<p>    w1, x1, y1, z1 = q1.to_array()<\/p>\n<p>    w2, x2, y2, z2 = q2.to_array()<\/p>\n<p>    w = w1 * w2 - x1 * x2 - y1 * y2 - z1 * z2<\/p>\n<p>    x = w1 * x2 + x1 * w2 + y1 * z2 - z1 * y2<\/p>\n<p>    y = w1 * y2 - x1 * z2 + y1 * w2 + z1 * x2<\/p>\n<p>    z = w1 * z2 + x1 * y2 - y1 * x2 + z1 * w2<\/p>\n<p>    return Quaternion(w, x, y, z)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5c06\u56db\u5143\u6570\u8f6c\u6362\u4e3a\u65cb\u8f6c\u77e9\u9635<\/h3>\n<\/p>\n<p><p>\u65cb\u8f6c\u77e9\u9635\u662f\u53e6\u4e00\u79cd\u8868\u793a\u4e09\u7ef4\u65cb\u8f6c\u7684\u65b9\u5f0f\uff0c\u53ef\u4ee5\u4ece\u56db\u5143\u6570\u4e2d\u63a8\u5bfc\u51fa\u6765\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def quaternion_to_rotation_matrix(q):<\/p>\n<p>    q = q.normalize()<\/p>\n<p>    w, x, y, z = q.to_array()<\/p>\n<p>    R = np.array([<\/p>\n<p>        [1 - 2*y&lt;strong&gt;2 - 2*z&lt;\/strong&gt;2, 2*x*y - 2*z*w, 2*x*z + 2*y*w],<\/p>\n<p>        [2*x*y + 2*z*w, 1 - 2*x&lt;strong&gt;2 - 2*z&lt;\/strong&gt;2, 2*y*z - 2*x*w],<\/p>\n<p>        [2*x*z - 2*y*w, 2*y*z + 2*x*w, 1 - 2*x&lt;strong&gt;2 - 2*y&lt;\/strong&gt;2]<\/p>\n<p>    ])<\/p>\n<p>    return R<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5c06\u56db\u5143\u6570\u8f6c\u6362\u4e3a\u6b27\u62c9\u89d2<\/h3>\n<\/p>\n<p><p>\u6b27\u62c9\u89d2\u662f\u53e6\u4e00\u79cd\u8868\u793a\u65cb\u8f6c\u7684\u65b9\u6cd5\uff0c\u901a\u5e38\u4ee5\u4e09\u4e2a\u89d2\u5ea6\u8868\u793a\u7ed5\u4e0d\u540c\u8f74\u7684\u65cb\u8f6c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def quaternion_to_euler(q):<\/p>\n<p>    q = q.normalize()<\/p>\n<p>    w, x, y, z = q.to_array()<\/p>\n<p>    t0 = +2.0 * (w * x + y * z)<\/p>\n<p>    t1 = +1.0 - 2.0 * (x * x + y * y)<\/p>\n<p>    roll_x = np.arctan2(t0, t1)<\/p>\n<p>    t2 = +2.0 * (w * y - z * x)<\/p>\n<p>    t2 = np.clip(t2, -1.0, +1.0)<\/p>\n<p>    pitch_y = np.arcsin(t2)<\/p>\n<p>    t3 = +2.0 * (w * z + x * y)<\/p>\n<p>    t4 = +1.0 - 2.0 * (y * y + z * z)<\/p>\n<p>    yaw_z = np.arctan2(t3, t4)<\/p>\n<p>    return roll_x, pitch_y, yaw_z<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u5c06\u56db\u5143\u6570\u8f6c\u6362\u4e3a\u8f74\u89d2\u8868\u793a<\/h3>\n<\/p>\n<p><p>\u8f74\u89d2\u8868\u793a\u4e5f\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u65cb\u8f6c\u8868\u793a\u65b9\u6cd5\uff0c\u5305\u542b\u4e00\u4e2a\u65cb\u8f6c\u8f74\u548c\u4e00\u4e2a\u65cb\u8f6c\u89d2\u5ea6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def quaternion_to_axis_angle(q):<\/p>\n<p>    q = q.normalize()<\/p>\n<p>    w, x, y, z = q.to_array()<\/p>\n<p>    angle = 2 * np.arccos(w)<\/p>\n<p>    s = np.sqrt(1 - w2)<\/p>\n<p>    if s &lt; 1e-8:<\/p>\n<p>        x = 1<\/p>\n<p>        y = 0<\/p>\n<p>        z = 0<\/p>\n<p>    else:<\/p>\n<p>        x \/= s<\/p>\n<p>        y \/= s<\/p>\n<p>        z \/= s<\/p>\n<p>    return (x, y, z), angle<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u4ece\u65cb\u8f6c\u77e9\u9635\u3001\u6b27\u62c9\u89d2\u548c\u8f74\u89d2\u751f\u6210\u56db\u5143\u6570<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u5c06\u56db\u5143\u6570\u8f6c\u6362\u4e3a\u5176\u4ed6\u8868\u793a\u5f62\u5f0f\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u4ece\u5176\u4ed6\u8868\u793a\u5f62\u5f0f\u751f\u6210\u56db\u5143\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def rotation_matrix_to_quaternion(R):<\/p>\n<p>    trace = np.trace(R)<\/p>\n<p>    if trace &gt; 0:<\/p>\n<p>        s = 0.5 \/ np.sqrt(trace + 1.0)<\/p>\n<p>        w = 0.25 \/ s<\/p>\n<p>        x = (R[2, 1] - R[1, 2]) * s<\/p>\n<p>        y = (R[0, 2] - R[2, 0]) * s<\/p>\n<p>        z = (R[1, 0] - R[0, 1]) * s<\/p>\n<p>    else:<\/p>\n<p>        if R[0, 0] &gt; R[1, 1] and R[0, 0] &gt; R[2, 2]:<\/p>\n<p>            s = 2.0 * np.sqrt(1.0 + R[0, 0] - R[1, 1] - R[2, 2])<\/p>\n<p>            w = (R[2, 1] - R[1, 2]) \/ s<\/p>\n<p>            x = 0.25 * s<\/p>\n<p>            y = (R[0, 1] + R[1, 0]) \/ s<\/p>\n<p>            z = (R[0, 2] + R[2, 0]) \/ s<\/p>\n<p>        elif R[1, 1] &gt; R[2, 2]:<\/p>\n<p>            s = 2.0 * np.sqrt(1.0 + R[1, 1] - R[0, 0] - R[2, 2])<\/p>\n<p>            w = (R[0, 2] - R[2, 0]) \/ s<\/p>\n<p>            x = (R[0, 1] + R[1, 0]) \/ s<\/p>\n<p>            y = 0.25 * s<\/p>\n<p>            z = (R[1, 2] + R[2, 1]) \/ s<\/p>\n<p>        else:<\/p>\n<p>            s = 2.0 * np.sqrt(1.0 + R[2, 2] - R[0, 0] - R[1, 1])<\/p>\n<p>            w = (R[1, 0] - R[0, 1]) \/ s<\/p>\n<p>            x = (R[0, 2] + R[2, 0]) \/ s<\/p>\n<p>            y = (R[1, 2] + R[2, 1]) \/ s<\/p>\n<p>            z = 0.25 * s<\/p>\n<p>    return Quaternion(w, x, y, z)<\/p>\n<p>def euler_to_quaternion(roll, pitch, yaw):<\/p>\n<p>    cy = np.cos(yaw * 0.5)<\/p>\n<p>    sy = np.sin(yaw * 0.5)<\/p>\n<p>    cp = np.cos(pitch * 0.5)<\/p>\n<p>    sp = np.sin(pitch * 0.5)<\/p>\n<p>    cr = np.cos(roll * 0.5)<\/p>\n<p>    sr = np.sin(roll * 0.5)<\/p>\n<p>    w = cr * cp * cy + sr * sp * sy<\/p>\n<p>    x = sr * cp * cy - cr * sp * sy<\/p>\n<p>    y = cr * sp * cy + sr * cp * sy<\/p>\n<p>    z = cr * cp * sy - sr * sp * cy<\/p>\n<p>    return Quaternion(w, x, y, z)<\/p>\n<p>def axis_angle_to_quaternion(axis, angle):<\/p>\n<p>    x, y, z = axis<\/p>\n<p>    s = np.sin(angle \/ 2)<\/p>\n<p>    w = np.cos(angle \/ 2)<\/p>\n<p>    return Quaternion(w, x * s, y * s, z * s)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u793a\u4f8b\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u66f4\u597d\u5730\u7406\u89e3\u4e0a\u9762\u7684\u5185\u5bb9\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528\u4e0a\u8ff0\u65b9\u6cd5\u8fdb\u884c\u56db\u5143\u6570\u8f6c\u6362\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if __name__ == &quot;__m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n__&quot;:<\/p>\n<p>    q = Quaternion(1, 0, 1, 0)<\/p>\n<p>    q = q.normalize()<\/p>\n<p>    print(&quot;Normalized Quaternion:&quot;, q)<\/p>\n<p>    R = quaternion_to_rotation_matrix(q)<\/p>\n<p>    print(&quot;Rotation Matrix:\\n&quot;, R)<\/p>\n<p>    roll, pitch, yaw = quaternion_to_euler(q)<\/p>\n<p>    print(&quot;Euler Angles:&quot;, roll, pitch, yaw)<\/p>\n<p>    axis, angle = quaternion_to_axis_angle(q)<\/p>\n<p>    print(&quot;Axis-Angle:&quot;, axis, angle)<\/p>\n<p>    q_from_R = rotation_matrix_to_quaternion(R)<\/p>\n<p>    print(&quot;Quaternion from Rotation Matrix:&quot;, q_from_R)<\/p>\n<p>    q_from_euler = euler_to_quaternion(roll, pitch, yaw)<\/p>\n<p>    print(&quot;Quaternion from Euler Angles:&quot;, q_from_euler)<\/p>\n<p>    q_from_axis_angle = axis_angle_to_quaternion(axis, angle)<\/p>\n<p>    print(&quot;Quaternion from Axis-Angle:&quot;, q_from_axis_angle)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u6211\u4eec\u53ef\u4ee5\u5728Python\u4e2d\u65b9\u4fbf\u5730\u8fdb\u884c\u56db\u5143\u6570\u8f6c\u6362\uff0c\u5e76\u5c06\u5176\u5e94\u7528\u4e8e\u4e09\u7ef4\u7a7a\u95f4\u65cb\u8f6c\u7684\u5404\u79cd\u8868\u793a\u5f62\u5f0f\u3002<strong>\u56db\u5143\u6570\u7684\u7075\u6d3b\u6027\u548c\u9ad8\u6548\u6027\u4f7f\u5176\u6210\u4e3a\u8ba1\u7b97\u673a\u56fe\u5f62\u5b66\u3001\u673a\u5668\u4eba\u5b66\u548c\u822a\u7a7a\u822a\u5929\u7b49\u9886\u57df\u4e2d\u7684\u91cd\u8981\u5de5\u5177\u3002<\/strong><\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0\u56db\u5143\u6570\u5230\u6b27\u62c9\u89d2\u7684\u8f6c\u6362\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>numpy<\/code>\u5e93\u548c<code>scipy<\/code>\u5e93\u4e2d\u7684<code>Rotation<\/code>\u7c7b\u6765\u5c06\u56db\u5143\u6570\u8f6c\u6362\u4e3a\u6b27\u62c9\u89d2\u3002\u9996\u5148\uff0c\u786e\u4fdd\u60a8\u5df2\u7ecf\u5b89\u88c5\u4e86\u8fd9\u4e24\u4e2a\u5e93\u3002\u7136\u540e\uff0c\u60a8\u53ef\u4ee5\u6309\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u8f6c\u6362\uff1a<\/p>\n<pre><code class=\"language-python\">import numpy as np\nfrom scipy.spatial.transform import Rotation as R\n\n# \u5b9a\u4e49\u56db\u5143\u6570\nquaternion = [w, x, y, z]  # \u66ff\u6362\u4e3a\u60a8\u7684\u56db\u5143\u6570\u503c\nr = R.from_quat(quaternion)\n\n# \u8f6c\u6362\u4e3a\u6b27\u62c9\u89d2\uff08\u4ee5\u5f27\u5ea6\u4e3a\u5355\u4f4d\uff09\neuler_angles = r.as_euler(&#39;xyz&#39;)\nprint(euler_angles)\n<\/code><\/pre>\n<p>\u8fd9\u91cc\u7684<code>&#39;xyz&#39;<\/code>\u8868\u793a\u60a8\u5e0c\u671b\u4ee5XYZ\u987a\u5e8f\u83b7\u53d6\u6b27\u62c9\u89d2\uff0c\u60a8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u66f4\u6539\u987a\u5e8f\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u5c06\u56db\u5143\u6570\u8f6c\u6362\u4e3a\u65cb\u8f6c\u77e9\u9635\uff1f<\/strong><br \/>\u8981\u5c06\u56db\u5143\u6570\u8f6c\u6362\u4e3a\u65cb\u8f6c\u77e9\u9635\uff0c\u53ef\u4ee5\u4f7f\u7528<code>scipy<\/code>\u5e93\u4e2d\u7684<code>Rotation<\/code>\u7c7b\u3002\u5728\u5b9a\u4e49\u56db\u5143\u6570\u540e\uff0c\u60a8\u53ef\u4ee5\u8c03\u7528<code>as_matrix()<\/code>\u65b9\u6cd5\u83b7\u53d6\u65cb\u8f6c\u77e9\u9635\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<pre><code class=\"language-python\">import numpy as np\nfrom scipy.spatial.transform import Rotation as R\n\n# \u5b9a\u4e49\u56db\u5143\u6570\nquaternion = [w, x, y, z]  # \u66ff\u6362\u4e3a\u60a8\u7684\u56db\u5143\u6570\u503c\nr = R.from_quat(quaternion)\n\n# \u8f6c\u6362\u4e3a\u65cb\u8f6c\u77e9\u9635\nrotation_matrix = r.as_matrix()\nprint(rotation_matrix)\n<\/code><\/pre>\n<p>\u65cb\u8f6c\u77e9\u9635\u53ef\u4ee5\u7528\u4e8e\u5404\u79cd\u8ba1\u7b97\u548c\u53d8\u6362\u3002<\/p>\n<p><strong>\u56db\u5143\u6570\u8f6c\u6362\u65f6\uff0c\u6709\u54ea\u4e9b\u5e38\u89c1\u7684\u9519\u8bef\u9700\u8981\u907f\u514d\uff1f<\/strong><br \/>\u5728\u8fdb\u884c\u56db\u5143\u6570\u8f6c\u6362\u65f6\uff0c\u6709\u51e0\u79cd\u5e38\u89c1\u7684\u9519\u8bef\u9700\u8981\u6ce8\u610f\u3002\u9996\u5148\uff0c\u786e\u4fdd\u56db\u5143\u6570\u662f\u5355\u4f4d\u56db\u5143\u6570\uff0c\u5373\u5176\u6a21\u957f\u4e3a1\u3002\u5982\u679c\u56db\u5143\u6570\u4e0d\u662f\u5355\u4f4d\u56db\u5143\u6570\uff0c\u8f6c\u6362\u7ed3\u679c\u53ef\u80fd\u4e0d\u51c6\u786e\u3002\u5176\u6b21\uff0c\u6ce8\u610f\u56db\u5143\u6570\u7684\u987a\u5e8f\uff0c\u901a\u5e38\u4f7f\u7528\u7684\u662f[w, x, y, z]\u683c\u5f0f\uff0c\u4f46\u5728\u67d0\u4e9b\u5e93\u4e2d\u53ef\u80fd\u4f1a\u4f7f\u7528\u4e0d\u540c\u7684\u987a\u5e8f\u3002\u786e\u4fdd\u60a8\u4f7f\u7528\u7684\u5e93\u4e0e\u60a8\u63d0\u4f9b\u7684\u56db\u5143\u6570\u683c\u5f0f\u4e00\u81f4\uff0c\u4ee5\u907f\u514d\u8bef\u89e3\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u56db\u5143\u6570\uff08Quaternion\uff09\u662f\u4e00\u79cd\u7528\u6765\u8868\u793a\u4e09\u7ef4\u7a7a\u95f4\u65cb\u8f6c\u7684\u6570\u5b66\u5de5\u5177\u3002\u3001\u56db\u5143\u6570\u8f6c\u6362\u53ef\u4ee5\u901a\u8fc7\u51e0\u4e2a [&hellip;]","protected":false},"author":3,"featured_media":1109151,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1109142"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1109142"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1109142\/revisions"}],"predecessor-version":[{"id":1109155,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1109142\/revisions\/1109155"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1109151"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1109142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1109142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1109142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}