Input and output

Text files

loadtxt

Load data from a text file.

fromstring

A new 1-D array initialized from text data in a string.

ndarray.tolist

Converts the array to a (possibly nested) Python list.

Raw binary files

fromfile

Construct an array from data in a text or binary file.

Base-n representations

binary_repr

Return the binary representation of the input number as a string.