Skip to content

Commit

Permalink
Switch to item() method
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdawn committed Jun 30, 2020
1 parent 7e2f13a commit 2f130f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions satpy/readers/agri_l1.py
Expand Up @@ -105,9 +105,9 @@ def get_dataset(self, dataset_id, ds_info):
data.attrs.update({'platform_name': satname,
'sensor': self['/attr/Sensor Identification Code'].lower(),
'orbital_parameters': {
'satellite_nominal_latitude': float(self['/attr/NOMCenterLat']),
'satellite_nominal_longitude': float(self['/attr/NOMCenterLon']),
'satellite_nominal_altitude': float(self['/attr/NOMSatHeight'])}})
'satellite_nominal_latitude': self['/attr/NOMCenterLat'].item(),
'satellite_nominal_longitude': self['/attr/NOMCenterLon'].item(),
'satellite_nominal_altitude': self['/attr/NOMSatHeight'].item()}})
data.attrs.update(ds_info)

# remove attributes that could be confusing later
Expand Down

0 comments on commit 2f130f2

Please sign in to comment.