<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>auewe</author_name>
  <author_url>https://blog.hatena.ne.jp/auewe/</author_url>
  <blog_title>余白の書きなぐり</blog_title>
  <blog_url>https://auewe.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>並列計算</anon>
  </categories>
  <description>pythonで並列計算をしたいとき、Poolとmapを使うのが簡単だった。 C言語で並列計算して配列に格納する のと同じような感覚。 mapを使うのがカッコイイ。Haskellみたい。 簡単な例 twiceFuncという名の関数 f(x) = 2x に argList = [1,2,3] の各要素を並列に代入して、 resultList = [2,4,6] を得るプログラム from multiprocessing import Pool def twiceFunc(arg): return 2 * arg if __name__ == '__main__': argList = [ 1, 2…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fauewe.hatenablog.com%2Fentry%2F2013%2F10%2F16%2F062911&quot; title=&quot;Pythonで並列計算(Poolとmapを使う) - 余白の書きなぐり&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>2013-10-16 06:29:11</published>
  <title>Pythonで並列計算(Poolとmapを使う)</title>
  <type>rich</type>
  <url>https://auewe.hatenablog.com/entry/2013/10/16/062911</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
