<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hoxo_m</author_name>
  <author_url>https://blog.hatena.ne.jp/hoxo_m/</author_url>
  <blog_title>ほくそ笑む</blog_title>
  <blog_url>https://hoxo-m.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>R でテンソルのインデックス行列のイテレータを書く必要があったので書きました。 例えば、2 x 3 の行列のインデックス行列は expand.grid() 関数を使えば次のように簡単に得られます。 &gt; expand.grid(1:2, 1:3) Var1 Var2 1 1 1 2 2 1 3 1 2 4 2 2 5 1 3 6 2 3 しかし、2000 x 2000 x 2000 のテンソルのインデックス行列を同じ方法で得ようとすると、メモリが足りずにエラーが出ます。 &gt; expand.grid(1:2000, 1:2000, 1:2000) エラー: サイズ 29.8 Gb のベクトルを割り…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhoxo-m.hatenablog.com%2Fentry%2F2020%2F09%2F05%2F165502&quot; title=&quot;R でテンソルのインデックス行列のイテレータを書いた - ほくそ笑む&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://m.media-amazon.com/images/I/41SitOdwMOL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-09-05 16:55:02</published>
  <title>R でテンソルのインデックス行列のイテレータを書いた</title>
  <type>rich</type>
  <url>https://hoxo-m.hatenablog.com/entry/2020/09/05/165502</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
