Commit af90d68f authored by Theo Steininger's avatar Theo Steininger
Browse files

Fixed serialization in HP/LM/GLSpace.

parent 85fcff13
Pipeline #10586 failed with stages
in 24 minutes and 30 seconds
......@@ -209,7 +209,7 @@ class GLSpace(Space):
def _to_hdf5(self, hdf5_group):
hdf5_group['nlat'] = self.nlat
hdf5_group['nlon'] = self.nlon
hdf5_group['dtype'] = self.dtype.name
hdf5_group.attrs['dtype'] = self.dtype.name
return None
......@@ -218,7 +218,7 @@ class GLSpace(Space):
result = cls(
nlat=hdf5_group['nlat'][()],
nlon=hdf5_group['nlon'][()],
dtype=np.dtype(hdf5_group['dtype'][()])
dtype=np.dtype(hdf5_group.attrs['dtype'])
)
return result
......@@ -209,13 +209,13 @@ class HPSpace(Space):
def _to_hdf5(self, hdf5_group):
hdf5_group['nside'] = self.nside
hdf5_group['dtype'] = self.dtype.name
hdf5_group.attrs['dtype'] = self.dtype.name
return None
@classmethod
def _from_hdf5(cls, hdf5_group, repository):
result = cls(
nside=hdf5_group['nside'][()],
dtype=np.dtype(hdf5_group['dtype'][()])
dtype=np.dtype(hdf5_group.attrs['dtype'])
)
return result
......@@ -194,13 +194,13 @@ class LMSpace(Space):
def _to_hdf5(self, hdf5_group):
hdf5_group['lmax'] = self.lmax
hdf5_group['dtype'] = self.dtype.name
hdf5_group.attrs['dtype'] = self.dtype.name
return None
@classmethod
def _from_hdf5(cls, hdf5_group, repository):
result = cls(
lmax=hdf5_group['lmax'][()],
dtype=np.dtype(hdf5_group['dtype'][()])
dtype=np.dtype(hdf5_group.attrs['dtype'])
)
return result
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment