diff --git a/pyiron_continuum/damask/factory.py b/pyiron_continuum/damask/factory.py index 04bf5fa5..d083c7ff 100644 --- a/pyiron_continuum/damask/factory.py +++ b/pyiron_continuum/damask/factory.py @@ -79,13 +79,11 @@ def origin(self, value): @staticmethod def via_voronoi_tessellation(spatial_discretization, num_grains, box_size): - if isinstance(spatial_discretization, int) or isinstance( - spatial_discretization, float - ): + if isinstance(spatial_discretization, (int, float)): spatial_discretization = np.array( [spatial_discretization, spatial_discretization, spatial_discretization] ) - if isinstance(box_size, int) or isinstance(box_size, float): + if isinstance(box_size, (int, float)): box_size = np.array([box_size, box_size, box_size]) seed = seeds.from_random(box_size, num_grains) return GeomGrid.from_Voronoi_tessellation( diff --git a/pyiron_continuum/toolkit.py b/pyiron_continuum/toolkit.py index b507d5f4..fe05e9be 100644 --- a/pyiron_continuum/toolkit.py +++ b/pyiron_continuum/toolkit.py @@ -79,13 +79,13 @@ def Loading(solver, load_steps): def generate_loading_tensor(default="F"): return DAMASKCreator.generate_loading_tensor(default=default) - generate_loading_tensor.__doc__ = DAMASKCreator.generate_loading_tensor.__doc__ + generate_loading_tensor.__func__.__doc__ = DAMASKCreator.generate_loading_tensor.__doc__ @staticmethod def loading_tensor_to_dict(key, value): return DAMASKCreator.loading_tensor_to_dict(key, value) - loading_tensor_to_dict.__doc__ = DAMASKCreator.loading_tensor_to_dict.__doc__ + loading_tensor_to_dict.__func__.__doc__ = DAMASKCreator.loading_tensor_to_dict.__doc__ @staticmethod def generate_load_step( @@ -113,7 +113,7 @@ def generate_load_step( estimate_rate=estimate_rate, ) - generate_load_step.__doc__ = DAMASKCreator.generate_load_step.__doc__ + generate_load_step.__func__.__doc__ = DAMASKCreator.generate_load_step.__doc__ @staticmethod def Material(rotation, elements, phase, homogenization):