bundles / astropy latest / 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: ndarrayThe Numpy array to write.
outfile: file-likeA file-like object such as a Python file object, an io.BytesIO, or anything else with a
writemethod. The file object must support the buffer interface in itswrite.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