bundles / numpy 2.4.3 / numpy / lib / format / read_array_header_2_0
function
numpy.lib.format:read_array_header_2_0
source: /numpy/lib/_format_impl.py :548
Signature
def read_array_header_2_0 ( fp , max_header_size = 10000 ) Summary
Read an array header from a filelike object using the 2.0 file format version.
Extended Summary
This will leave the file object located just after the header.
Parameters
fp: filelike objectA file object or something with a
.read()method like a file.max_header_size: int, optionalMaximum allowed size of the header. Large headers may not be safe to load securely and thus require explicitly passing a larger value. See
ast.literal_eval()for details.
Returns
shape: tuple of intThe shape of the array.
fortran_order: boolThe array data will be written out directly if it is either C-contiguous or Fortran-contiguous. Otherwise, it will be made contiguous before writing it out.
dtype: dtypeThe dtype of the file's data.
Raises
: ValueErrorIf the data is invalid.
Aliases
-
numpy.lib._format_impl.read_array_header_2_0