Skip to content

Commit

Permalink
Merge pull request #36 from alliander-opensource/bugfix/concat-np-arrays
Browse files Browse the repository at this point in the history
Fix multi component bug
  • Loading branch information
bramstoeller authored Oct 20, 2022
2 parents 40af6d7 + aa31adf commit 3e4b2ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
rev: v0.982
hooks:
- id: mypy
- repo: local
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ classifiers=[
]
requires-python = ">=3.9"
dependencies = [
"numpy",
"numpy>=1.20",
"openpyxl",
"pandas",
"power_grid_model>=1.4",
Expand Down
3 changes: 2 additions & 1 deletion src/power_grid_model_io/converters/tabular_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ def _merge_pgm_data(self, data: Dict[str, List[np.ndarray]]) -> Dict[str, np.nda

# If there are numtiple arrays, concatenate them
elif len(data_set) > 1:
merged[component_name] = np.concatenate(data_set)
# pylint: disable=unexpected-keyword-arg
merged[component_name] = np.concatenate(data_set, dtype=data_set[0].dtype)

return merged

Expand Down

0 comments on commit 3e4b2ef

Please sign in to comment.