This is documentation for an old release of NumPy (version 1.18). Read this page in the documentation of the latest stable release (version 2.2).
Input and output¶
NumPy binary files (NPY, NPZ)¶
|
Load arrays or pickled objects from |
|
Save an array to a binary file in NumPy |
|
Save several arrays into a single file in uncompressed |
|
Save several arrays into a single file in compressed |
The format of these binary file types is documented in
numpy.lib.format
Text files¶
|
Load data from a text file. |
|
Save an array to a text file. |
|
Load data from a text file, with missing values handled as specified. |
|
Construct an array from a text file, using regular expression parsing. |
|
A new 1-D array initialized from text data in a string. |
|
Write array to a file as text or binary (default). |
Return the array as an |
Raw binary files¶
|
Construct an array from data in a text or binary file. |
|
Write array to a file as text or binary (default). |
String formatting¶
|
Return a string representation of an array. |
|
Return the string representation of an array. |
|
Return a string representation of the data in an array. |
|
Format a floating-point scalar as a decimal string in positional notation. |
|
Format a floating-point scalar as a decimal string in scientific notation. |
Text formatting options¶
|
Set printing options. |
Return the current print options. |
|
|
Set a Python function to be used when pretty printing arrays. |
|
Context manager for setting print options. |
Base-n representations¶
|
Return the binary representation of the input number as a string. |
|
Return a string representation of a number in the given base system. |
Data sources¶
|
A generic data source file (file, http, ftp, …). |
Binary Format Description¶
Binary serialization |