21/11/22 15:12:56.63 PHd8OvUid.net
Python初心者です
URLリンク(teratail.com)
このページを参考にBytesIOを使おうと考えています
a = np.load(BytesIO(binary))
このように使った場合、BytesIOは不要と判断されて開放されるのでしょうか?
URLリンク(docs.python.org)
The buffer is discarded when the close() method is called.
とのことで、
stream = BytesIO(binary)
a = np.load(stream)
stream.close()
としたほうが良いのでしょうか?