numpy での奇妙な動作 (バグ??)。ドキュメントに反して、次のコードは RuntimeWarning: 無効な値が fmax で発生しました
a = np.random.uniform(0.1, 0.4, (5, 5))
b = np.random.uniform(0, 3.5, (5, 5))
b[0, 0] = np.nan
c = np.fmax(a, b) # Same problem with c = np.maximum(a, b)
配列にこれらの NaN が必要なため行き詰まりましたが、iPython で関数が停止し、このいまいましい警告が表示されます (OK、実際には停止しませんが、かなり面倒です)。
編集:
numpy 1.6.1
ipython 0.13.1