File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ Other Changes and Additions
1010Bug Fixes
1111^^^^^^^^^
1212
13+ - Do not allow the first argument of ``subtract_overscan `` to be a plain numpy
14+ array. [#867]
15+
13162.4.3 (2025-01-15)
1417------------------
1518
Original file line number Diff line number Diff line change @@ -475,8 +475,8 @@ def subtract_overscan(
475475 Spaces are stripped out of the ``fits_section`` string.
476476
477477 """
478- if not ( isinstance (ccd , CCDData ) or isinstance ( ccd , np . ndarray ) ):
479- raise TypeError ("ccddata is not a CCDData or ndarray object." )
478+ if not isinstance (ccd , CCDData ):
479+ raise TypeError ("ccddata is not a CCDData object." )
480480
481481 if (overscan is not None and fits_section is not None ) or (
482482 overscan is None and fits_section is None
Original file line number Diff line number Diff line change @@ -305,6 +305,9 @@ def test_subtract_overscan_fails():
305305 # Does a fits_section which is not a string raise an error?
306306 with pytest .raises (TypeError ):
307307 subtract_overscan (ccd_data , fits_section = 5 )
308+ # Do we raise an error if the input is a plain array?
309+ with pytest .raises (TypeError ):
310+ subtract_overscan (np .zeros ((10 , 10 )), fits_section = "[1:10]" )
308311
309312
310313def test_trim_image_fits_section_requires_string ():
You can’t perform that action at this time.
0 commit comments