<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nishiohirokazu</author_name>
  <author_url>https://blog.hatena.ne.jp/nishiohirokazu/</author_url>
  <blog_title>西尾泰和のはてなダイアリー</blog_title>
  <blog_url>https://nishiohirokazu.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>numpyのsortは、特に2次元(以上)の時に「リストのリスト」のような気持ちでsortすると「リストの中の各々のリストがソートされる」という挙動をするのでハマる &gt;&gt;&gt; x = [[6, 5], [4, 3], [2, 1]] &gt;&gt;&gt; y = array(x) &gt;&gt;&gt; x.sort() &gt;&gt;&gt; x [[2, 1], [4, 3], [6, 5]] &gt;&gt;&gt; y.sort() &gt;&gt;&gt; y array([[5, 6], [3, 4], [1, 2]])numpyのsortは引数に「どの軸についてソートするか」を指定できるが、それを省略した場合のデフォルト値が「-1」つまり「一番内側のリストを個別…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnishiohirokazu.hatenadiary.org%2Fentry%2F20111201%2F1322713121&quot; title=&quot;numpyのarray#sortの挙動が想定外だった件 - 西尾泰和のはてなダイアリー&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-12-01 13:18:41</published>
  <title>numpyのarray#sortの挙動が想定外だった件</title>
  <type>rich</type>
  <url>https://nishiohirokazu.hatenadiary.org/entry/20111201/1322713121</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
