From 0b0c0d46efd7c25c79e1244159ab49e991379130 Mon Sep 17 00:00:00 2001 From: SamTov Date: Tue, 14 May 2024 13:46:11 +0200 Subject: [PATCH] More dataclass refactoring --- znvis/mesh/mesh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/znvis/mesh/mesh.py b/znvis/mesh/mesh.py index bf63ae8..c84d16b 100644 --- a/znvis/mesh/mesh.py +++ b/znvis/mesh/mesh.py @@ -20,7 +20,7 @@ Module for the mesh parent class. """ -from dataclasses import dataclass +from dataclasses import dataclass, field import numpy as np import open3d as o3d @@ -41,7 +41,7 @@ class Mesh: """ material: Material = Material() - base_direction = np.array([1, 0, 0]) + base_direction = field(default_factory=lambda: np.array([1, 0, 0])) def __post_init__(self): """