{ } Raw JSON

bundles / astropy 7.0.1 / astropy / io / fits / util / _array_to_file

function

astropy.io.fits.util:_array_to_file

source: /astropy/io/fits/util.py :546

Signature

def   _array_to_file ( arr outfile )

Summary

Write a numpy array to a file or a file-like object.

Parameters

arr : ndarray

The Numpy array to write.

outfile : file-like

A file-like object such as a Python file object, an io.BytesIO, or anything else with a write method. The file object must support the buffer interface in its write.

If writing directly to an on-disk file this delegates directly to
`ndarray.tofile`. Otherwise a slower Python implementation is used.

Aliases

  • astropy.io.fits.file._array_to_file