{ } Raw JSON

bundles / numpy 2.4.4 / numpy / lib / _format_impl / _read_bytes

function

numpy.lib._format_impl:_read_bytes

source: /numpy/lib/_format_impl.py :998

Signature

def   _read_bytes ( fp size error_template = ran out of data )

Summary

Read from file-like object until size bytes are read. Raises ValueError if not EOF is encountered before size bytes are read. Non-blocking objects only supported if they derive from io objects.

Extended Summary

Required as e.g. ZipExtFile in python 2.6 can return less data than requested.

Aliases

  • numpy.lib._format_impl._read_bytes