Input and output

NPZ files

load(file[, mmap_mode]) Load a pickled, .npy, or .npz binary file.
save(file, arr) Save an array to a binary file in NumPy .npy format.
savez(file, *args, **kwds) Save several arrays into a single, compressed file in .npz format.

Text files

loadtxt(fname[, dtype, comments, delimiter, ...]) Load data from a text file.
savetxt(fname, X[, fmt, delimiter]) Save an array to a text file.
genfromtxt(fname[, dtype, comments, ...]) Load data from a text file, with missing values handled as specified.
fromregex(file, regexp, dtype) Construct an array from a text file, using regular expression parsing.
fromstring(string[, dtype, count, sep]) Return a new 1-D array initialized from raw binary or text data in string.
ndarray.tofile(fid[, sep, format]) Write array to a file as text or binary (default).
ndarray.tolist() Return the array as a (possibly nested) list.

String formatting

array_repr(arr[, max_line_width, precision, ...]) Return the string representation of an array.
array_str(a[, max_line_width, precision, ...]) Return a string representation of the data in an array.

Memory mapping files

memmap Create a memory-map to an array stored in a binary file on disk.

Text formatting options

set_printoptions([precision, threshold, ...]) Set printing options.
get_printoptions() Return the current print options.
set_string_function(f[, repr]) Set a Python function to be used when pretty printing arrays.

Base-n representations

binary_repr(num[, width]) Return the binary representation of the input number as a string.
base_repr(number[, base, padding]) Return a string representation of a number in the given base system.

Data sources

DataSource([destpath]) A generic data source file (file, http, ftp, ...).

Table Of Contents

Previous topic

numpy.mintypecode

Next topic

numpy.load

This Page