, arr, allow_pickle=None)[source]#

Saves an array to a binary file in .npy format.

  • file (file or str) – File or filename to save.

  • arr (array_like) – Array to save. It should be able to feed to cupy.asnumpy().

  • allow_pickle (bool) – Allow saving object arrays using Python pickles. Reasons for disallowing pickles include security (loading pickled data can execute arbitrary code) and portability (pickled objects may not be loadable on different Python installations, for example if the stored objects require libraries that are not available, and not all pickled data is compatible between Python 2 and Python 3). The default is True. This option is available only for NumPy 1.10 or later. In NumPy 1.9, this option cannot be specified (saving objects using pickles is always allowed).

See also