{ } Raw JSON

bundles / astropy latest / astropy / io / fits / fitsrec / FITS_rec / copy

function

astropy.io.fits.fitsrec:FITS_rec.copy

source: /astropy/io/fits/fitsrec.py :586

Signature

def   copy ( self order = C )

Summary

The Numpy documentation lies; numpy.ndarray.copy is not equivalent to numpy.copy. Differences include that it re-views the copied array as self's ndarray subclass, as though it were taking a slice; this means __array_finalize__ is called and the copy shares all the array attributes (including ._converted!). So we need to make a deep copy of all those attributes so that the two arrays truly do not share any data.

Aliases

  • astropy.io.fits.FITS_rec.copy