fix : _GI_initializer function updated

pull/83/head
sepandhaghighi 2022-01-06 00:47:19 +03:30
rodzic 843ab6684b
commit d84bcff6a1
2 zmienionych plików z 14 dodań i 10 usunięć

Wyświetl plik

@ -220,14 +220,24 @@ def generate_params_filter(
g.seed, g.start, g.step, g.stop = seed, start, step, stop g.seed, g.start, g.step, g.stop = seed, start, step, stop
def _GI_initializer(g): def _GI_initializer(g, function1, function2):
""" """
Initialize the generative image. Initialize the generative image.
:param g: generative image instance :param g: generative image instance
:type g: GenerativeImage :type g: GenerativeImage
:param function1: function 1
:type function1: python or lambda function
:param function2: function 2
:type function2: python or lambda function
:return: None :return: None
""" """
self.matplotlib_version = matplotlib.__version__
self.function1 = function1
self.function1_str = None
self.function2 = function2
self.function2_str = None
self.fig = None
g.seed = None g.seed = None
g.start = DEFAULT_START g.start = DEFAULT_START
g.step = DEFAULT_STEP g.step = DEFAULT_STEP

Wyświetl plik

@ -26,22 +26,16 @@ class GenerativeImage:
""" """
Init method. Init method.
:param function1: Function 1 :param function1: function 1
:type function1: python or lambda function :type function1: python or lambda function
:param function2: Function 2 :param function2: function 2
:type function2: python or lambda function :type function2: python or lambda function
:param data: prior generated data :param data: prior generated data
:type data: (io.IOBase & file) :type data: (io.IOBase & file)
:param config: generative image config :param config: generative image config
:type config: (io.IOBase & file) :type config: (io.IOBase & file)
""" """
_GI_initializer(self) _GI_initializer(self, function1, function2)
self.matplotlib_version = matplotlib.__version__
self.function1 = function1
self.function1_str = None
self.function2 = function2
self.function2_str = None
self.fig = None
if config is not None: if config is not None:
load_config(self, config) load_config(self, config)
if data is not None: if data is not None: