Skip to content

Commit

Permalink
Minor bug fixes (#258)
Browse files Browse the repository at this point in the history
* Fix minor bug

* Fix typing bug
  • Loading branch information
nikhilwoodruff authored Aug 28, 2024
1 parent 62e6be0 commit 6a7afa2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
fixed:
- Bugs in typing and Dataset saving.
2 changes: 1 addition & 1 deletion policyengine_core/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def save_dataset(self, data, file_path: str = None) -> None:
f"Could not save {variable} to {file}. The value is {value}."
)
elif self.data_format == Dataset.FLAT_FILE:
values.to_csv(file, index=False)
data.to_csv(file, index=False)

def load_dataset(
self,
Expand Down
2 changes: 1 addition & 1 deletion policyengine_core/types/data_types/arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

T = TypeVar("T", bool, bytes, float, int, object, str)

ArrayLike = ArrayType[Any] | Sequence[T]
ArrayLike = Sequence[T]

""":obj:`typing.Generic`: Type of any castable to :class:`numpy.ndarray`.
Expand Down

0 comments on commit 6a7afa2

Please sign in to comment.