NumPy

Previous topic

numpy.ndarray.__reduce__

Next topic

numpy.ndarray.__new__

This is documentation for an old release of NumPy (version 1.19). Read this page in the documentation of the latest stable release (version 2.2).

numpy.ndarray.__setstate__

method

ndarray.__setstate__(state, /)

For unpickling.

The state argument must be a sequence that contains the following elements:

Parameters
versionint

optional pickle version. If omitted defaults to 0.

shapetuple
dtypedata-type
isFortranbool
rawdatastring or list

a binary string with the data (or a list if ‘a’ is an object array)