We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24f3333 commit 91b4fefCopy full SHA for 91b4fef
piff/readers.py
@@ -20,7 +20,6 @@
20
21
import fitsio
22
import galsim
23
-import numpy as np
24
25
26
class FitsReader:
@@ -63,13 +62,7 @@ def read_struct(self, name):
63
62
cols = self._fits[extname].get_colnames()
64
data = self._fits[extname].read()
65
assert len(data) == 1
66
- struct = dict([ (col, data[col][0]) for col in cols ])
67
- for k, v in struct.items():
68
- # We assume all bytes are supposed to be strs in read_struct, but
69
- # not in read_table.
70
- if isinstance(v, bytes):
71
- struct[k] = v.decode()
72
- return struct
+ return dict([ (col, data[col][0]) for col in cols ])
73
74
def read_table(self, name, metadata=None):
75
"""Load a table as a numpy array.
0 commit comments