<Python, numpy> 空のアレイを作る(コピー元がある場合)
空empty
のアレイarray
の作り方(コピー元がある場合)。
np.empty_like()
で作成。
In [14]: g.axes Out[14]: array([[<matplotlib.axes._subplots.AxesSubplot object at 0x2b035890a278>], [<matplotlib.axes._subplots.AxesSubplot object at 0x2b033df20a90>], [<matplotlib.axes._subplots.AxesSubplot object at 0x2b035b084fd0>], [<matplotlib.axes._subplots.AxesSubplot object at 0x2b035b0c1e10>], [<matplotlib.axes._subplots.AxesSubplot object at 0x2b035b10e4a8>]], dtype=object) In [15]: np.empty_like(g.axes) Out[15]: array([[None], [None], [None], [None], [None]], dtype=object)
ふーん。