Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.7.39

* fix: Correctly assign mutable default value to variable in `LayoutElements` class

## 0.7.38

* fix: Correctly assign mutable default value to variable in `TextRegions` class
Expand Down
2 changes: 1 addition & 1 deletion unstructured_inference/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.38" # pragma: no cover
__version__ = "0.7.39" # pragma: no cover
6 changes: 3 additions & 3 deletions unstructured_inference/inference/layoutelement.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from dataclasses import dataclass
from dataclasses import dataclass, field
from typing import Any, Collection, Iterable, List, Optional

import numpy as np
Expand Down Expand Up @@ -30,8 +30,8 @@

@dataclass
class LayoutElements(TextRegions):
element_probs: np.ndarray = np.array([])
element_class_ids: np.ndarray = np.array([])
element_probs: np.ndarray = field(default_factory=lambda: np.array([]))
element_class_ids: np.ndarray = field(default_factory=lambda: np.array([]))
element_class_id_map: dict[int, str] | None = None

def __post_init__(self):
Expand Down
Loading