Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion astrodata/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,11 +1000,12 @@ def _pixel_info(self):

other_objects.append(obj_dict)

data_type = nd.data.dtype.name if nd.data.shape != () else ""
main_dict = {
"content": "science",
"type": type(nd).__name__,
"dim": str(nd.data.shape),
"data_type": nd.data.dtype.name,
"data_type": data_type,
}

out_dict = {
Expand Down
3 changes: 2 additions & 1 deletion astrodata/fits.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@ def header(self):
def data(self):
"""The data of the HDU."""
res = self._create_result(self.shape)
res[:] = self._scale(self._obj.data)
if self._obj.data is not None:
res[:] = self._scale(self._obj.data)
return res

@property
Expand Down
3 changes: 2 additions & 1 deletion astrodata/nddata.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,8 @@ def _get_simple(self, target, section=None):
if is_lazy(source):
if section is None:
ret = np.empty(source.shape, dtype=source.dtype)
ret[:] = source.data
if source.shape != ():
ret[:] = source.data
setattr(self, target, ret)

else:
Expand Down
Loading