Skip to content

Commit

Permalink
deprecated MaskGroup.to_dict #148
Browse files Browse the repository at this point in the history
  • Loading branch information
jacanchaplais committed Sep 4, 2023
1 parent 47c6159 commit acab617
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions graphicle/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import numpy.typing as npt
import typing_extensions as tyx
from attr import Factory, asdict, cmp_using, define, field, setters
from deprecation import deprecated
from mcpid.lookup import PdgRecords
from numpy.lib import recfunctions as rfn
from rich.console import Console
Expand Down Expand Up @@ -812,6 +813,11 @@ def data(self) -> base.BoolVector:
"Please contact developers with a bug report."
)

@deprecated(
deprecated_in="0.3.2",
removed_in="0.4.0",
details="Use MaskGroup.serialize() instead.",
)
def to_dict(self) -> ty.Dict[str, base.BoolVector]:
"""Masks nested in a dictionary instead of a ``MaskGroup``."""
return {key: val.data for key, val in self._mask_arrays.items()}
Expand Down

0 comments on commit acab617

Please sign in to comment.