diff --git a/src/TensorFlowNET.Core/NumPy/Implementation/NumPyImpl.Creation.cs b/src/TensorFlowNET.Core/NumPy/Implementation/NumPyImpl.Creation.cs index fa4ef0191..c0f9e695d 100644 --- a/src/TensorFlowNET.Core/NumPy/Implementation/NumPyImpl.Creation.cs +++ b/src/TensorFlowNET.Core/NumPy/Implementation/NumPyImpl.Creation.cs @@ -101,9 +101,10 @@ Array ReadValueMatrix(BinaryReader reader, Array matrix, int bytes, Type type, i Array ReadObjectMatrix(BinaryReader reader, Array matrix, int[] shape) { - Stream stream = reader.BaseStream; + Stream deflateStream = reader.BaseStream; + BufferedStream bufferedStream = new BufferedStream(deflateStream); var unpickler = new Unpickler(); - return (MultiArrayPickleWarpper)unpickler.load(stream); + return (MultiArrayPickleWarpper)unpickler.load(bufferedStream); } public (NDArray, NDArray) meshgrid(T[] array, bool copy = true, bool sparse = false)