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

Removed dtype remnants from FieldArray

parent 38c492f6
Pipeline #11898 passed with stages
in 16 minutes
......@@ -16,20 +16,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <>.
import numpy as np
from field_type import FieldType
class FieldArray(FieldType):
def __init__(self, shape, dtype=np.float):
def __init__(self, shape):
new_shape = tuple([int(i) for i in shape])
except TypeError:
new_shape = (int(shape), )
self._shape = new_shape
super(FieldArray, self).__init__(dtype=dtype)
super(FieldArray, self).__init__()
def shape(self):
......@@ -43,14 +41,9 @@ class FieldArray(FieldType):
def _to_hdf5(self, hdf5_group):
hdf5_group['shape'] = self.shape
hdf5_group.attrs['dtype'] =
return None
def _from_hdf5(cls, hdf5_group, loopback_get):
result = cls(
result = cls(shape=hdf5_group['shape'][:])
return result
Supports Markdown
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