<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Kurene</author_name>
  <author_url>https://blog.hatena.ne.jp/Kurene/</author_url>
  <blog_title>Wizard Notes</blog_title>
  <blog_url>https://www.wizard-notes.com/</blog_url>
  <categories>
    <anon>NumPy</anon>
    <anon>Python</anon>
  </categories>
  <description>Pythonで数値計算や信号処理をしていると，NumPy配列かどうか判別したいことがあります． import numpy as np np_array = np.array([0, 1, 2]) type(np_array) #=&gt; &lt;class 'numpy.ndarray'&gt; type(python_list) #=&gt; &lt;class 'list'&gt; 以上の例から NumPy配列とPythonのリストオブジェクトは異なるため，if type(np_array) is listでは判別できません． NumPy配列の判別の方法としては、例えば以下の3つの方法が使えます． type(np_arra…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.wizard-notes.com%2Fentry%2F20211009%2F1633705780&quot; title=&quot;Python：変数がNumPy配列かどうか判別する方法 - Wizard Notes&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-ak.f.st-hatena.com/images/fotolife/K/Kurene/20211008/20211008235850.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-10-09 00:09:40</published>
  <title>Python：変数がNumPy配列かどうか判別する方法</title>
  <type>rich</type>
  <url>https://www.wizard-notes.com/entry/20211009/1633705780</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
