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
10
10
Bug Fixes
11
11
^^^^^^^^^
12
12
13
+ - Do not allow the first argument of ``subtract_overscan `` to be a plain numpy
14
+ array. [#867]
15
+
13
16
2.4.3 (2025-01-15)
14
17
------------------
15
18
Original file line number Diff line number Diff line change @@ -475,8 +475,8 @@ def subtract_overscan(
475
475
Spaces are stripped out of the ``fits_section`` string.
476
476
477
477
"""
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." )
480
480
481
481
if (overscan is not None and fits_section is not None ) or (
482
482
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():
305
305
# Does a fits_section which is not a string raise an error?
306
306
with pytest .raises (TypeError ):
307
307
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]" )
308
311
309
312
310
313
def test_trim_image_fits_section_requires_string ():
You can’t perform that action at this time.
0 commit comments