This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / lib / _format_impl / _read_bytes

function

numpy.lib._format_impl:_read_bytes

source: build-install/usr/lib/python3.14/site-packages/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