Skip to content

Commit

Permalink
Added deepcopy method to SensorDict
Browse files Browse the repository at this point in the history
  • Loading branch information
danielandresarcones committed Aug 17, 2023
1 parent e7e0110 commit c6f1ada
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fenicsxconcrete/finite_element_problem/base_material.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import importlib
import json
from abc import ABC, abstractmethod
from copy import deepcopy
from dataclasses import dataclass
from pathlib import Path, PosixPath

Expand Down Expand Up @@ -239,3 +240,6 @@ def __setitem__(self, initial_key: str, value: BaseSensor) -> None:
value.name = key

super().__setitem__(key, value)

def __deepcopy__(self, memo):
return self.__class__({k: deepcopy(v, memo) for k, v in self.items()})

0 comments on commit c6f1ada

Please sign in to comment.