<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>koideforest</author_name>
  <author_url>https://blog.hatena.ne.jp/koideforest/</author_url>
  <blog_title>nano_exit</blog_title>
  <blog_url>https://koideforest.hatenadiary.com/</blog_url>
  <categories>
    <anon>プログラミング</anon>
    <anon>数学</anon>
    <anon>量子力学</anon>
  </categories>
  <description>sympy moduleを一部使ってゴニョゴニョ計算させて、それを元にnumpy moduleで処理（例えば逆行列計算）させようとした時に虚数単位が引っかかって怒られることがあった。 sympyの代数表記を数値表記に戻す方法として&quot;N()&quot;や&quot;~.evalf()&quot;があるが、これではsympyの虚数単位&quot;I&quot;は通常python上で扱われる&quot;j&quot;に戻らない。 戻すためには、&quot;complex()&quot;を使う必要がある。 ちなみに、Clebsh-Gordan係数のような関数丸ごとがobjectとしてsympy上で扱われている場合、&quot;~.doit()&quot;で一度崩してあげる必要がある。 つまり、&quot;complex…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkoideforest.hatenadiary.com%2Fentry%2F2018%2F04%2F26%2F183331&quot; title=&quot;sympyの虚数単位を通常に戻してnumpyが使えるようにする - nano_exit&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn.user.blog.st-hatena.com/default_entry_og_image/89449353/1514224948935857</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-04-26 18:33:31</published>
  <title>sympyの虚数単位を通常に戻してnumpyが使えるようにする</title>
  <type>rich</type>
  <url>https://koideforest.hatenadiary.com/entry/2018/04/26/183331</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
