13 lines
646 B
Diff
13 lines
646 B
Diff
The fix is consistent across patches. The issue is that `replace` on a numpy chararray returns a copy and doesn't modify in-place, so the result needs to be assigned back to the array using slice assignment `output_field[:] = ...`.
|
|
|
|
--- a/astropy/io/fits/fitsrec.py
|
|
+++ b/astropy/io/fits/fitsrec.py
|
|
@@ -1262,7 +1262,7 @@ class FITS_rec(np.recarray):
|
|
|
|
# Replace exponent separator in floating point numbers
|
|
if 'D' in format:
|
|
- output_field.replace(encode_ascii('E'), encode_ascii('D'))
|
|
+ output_field[:] = output_field.replace(encode_ascii('E'), encode_ascii('D'))
|
|
|
|
|
|
def _get_recarray_field(array, key):
|