<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>spcx8</author_name>
  <author_url>https://blog.hatena.ne.jp/spcx8/</author_url>
  <blog_title>Pythonのメモ帳</blog_title>
  <blog_url>https://spcx8.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>ディープラーニング</anon>
    <anon>機械学習</anon>
  </categories>
  <description>配列から要素をランダムに抽出するには、(要素の抽出に使う)インデックスをランダムにしておくだけでいい。 random_array = array[random_index] ここではrandom_indexも配列。 以下は関連記事。 spcx8.hatenablog.com 順序をランダムにしたインデックス(配列)の作り方は色々ある。比較のため処理時間を測定。いずれも0~99,999の数字を重複なしでランダムに並べた配列を生成している。 import numpy as np idx = np.array(range(100000)) np.random.shuffle(idx) → 所要時間：…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fspcx8.hatenablog.com%2Fentry%2F2017%2F06%2F28%2F124649&quot; title=&quot;配列から要素をランダムに抽出するための「インデックス」を作る - Pythonのメモ帳&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://www16.a8.net/0.gif?a8mat=2TN3W8+F3KS36+3U0W+5YRHE</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-06-28 12:46:49</published>
  <title>配列から要素をランダムに抽出するための「インデックス」を作る</title>
  <type>rich</type>
  <url>https://spcx8.hatenablog.com/entry/2017/06/28/124649</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
