fix FieldArray bug: do type check only when is_target or is_input is True
@@ -45,6 +45,7 @@ class FieldArray(object):
@is_input.setter
def is_input(self, value):
+ if value is True:
self.pytype = self._type_detection(self.content)
self.dtype = self._map_to_np_type(self.pytype)
self._is_input = value
@@ -55,6 +56,7 @@ class FieldArray(object):
@is_target.setter
def is_target(self, value):
+ if value is True:
self.pytype = self._type_detection(self.content)
self.dtype = self._map_to_np_type(self.pytype)
self._is_target = value
