Skip to content

Commit

Permalink
DOC: update docstrings for ignore_blank, writeto()
Browse files Browse the repository at this point in the history
  • Loading branch information
dhomeier committed Jun 28, 2024
1 parent 90fa6c8 commit 22df354
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions astropy/io/fits/hdu/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def readfrom(cls, fileobj, checksum=False, ignore_missing_end=False, **kwargs):
def writeto(self, name, output_verify="exception", overwrite=False, checksum=False):
"""
Write the HDU to a new file. This is a convenience method to
provide a user easier output interface if only one HDU needs
provide a user friendly output interface if only one HDU needs
to be written to a file.
Parameters
Expand Down Expand Up @@ -1600,9 +1600,9 @@ def match_header(cls, header):

def writeto(self, name, output_verify="exception", overwrite=False, checksum=False):
"""
Works similarly to the normal writeto(), but prepends a default
`PrimaryHDU` are required by extension HDUs (which cannot stand on
their own).
Works similarly to :func:`_BaseHDU.writeto`, but prepends a default
`PrimaryHDU` as required by extension HDUs (which cannot be written
on their own).
"""
from .hdulist import HDUList
from .image import PrimaryHDU
Expand Down
6 changes: 3 additions & 3 deletions astropy/io/fits/hdu/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,9 +779,9 @@ def _convert_pseudo_integer(self, data):
Handle "pseudo-unsigned" integers, if the user requested it. Returns
the converted data array if so; otherwise returns None.
In this case case, we don't need to handle BLANK to convert it to NAN,
since we can't do NaNs with integers, anyway, i.e. the user is
responsible for managing blanks.
Handling of BLANK is done outside of this function on the converted
uint data, meaning that BLANK needs to be shifted by BZERO as well
before conversion of the corresponding values to NaN.
"""
dtype = self._dtype_for_bitpix()
# bool(dtype) is always False--have to explicitly compare to None; this
Expand Down

0 comments on commit 22df354

Please sign in to comment.