<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mcbiophys</author_name>
  <author_url>https://blog.hatena.ne.jp/mcbiophys/</author_url>
  <blog_title>mcbiophys's Digital Bio</blog_title>
  <blog_url>https://mcbiophys.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>tips</anon>
    <anon>例外</anon>
  </categories>
  <description>例外処理Tipsシリーズ第一弾は 例外処理をうまく利用して列要素に対する写像をうまく実装する方法について説明します 具体的にはいわゆるFortranでいうところのelemental function をpython で実現する際に例外処理をうまく使えるとい話です。 def elemental_function(A, B, function): try: return [elemental_function(a, b, function) for a, b in zip(A, B)] except TypeError as e: return function(A, B) def Sum(A,B…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmcbiophys.hatenablog.com%2Fentry%2F2015%2F07%2F16%2F162512&quot; title=&quot;Python例外処理Tips ① 配列要素に対する写像をうまく実装する - mcbiophys&amp;#39;s Digital Bio&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>2015-07-16 16:25:12</published>
  <title>Python例外処理Tips ① 配列要素に対する写像をうまく実装する</title>
  <type>rich</type>
  <url>https://mcbiophys.hatenablog.com/entry/2015/07/16/162512</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
