Skip to content

fixed issue with single ensemble concatenation by allowing for choice of which axis to add to 1D arrays#248

Merged
jscora merged 10 commits intomainfrom
fix-ensemble-concatenation-of-ancillary-data
Jan 26, 2026
Merged

fixed issue with single ensemble concatenation by allowing for choice of which axis to add to 1D arrays#248
jscora merged 10 commits intomainfrom
fix-ensemble-concatenation-of-ancillary-data

Conversation

@jscora
Copy link

@jscora jscora commented Jan 13, 2026

Problem & Solution Description (including issue #)

This fixes an issue I ran into that concatenating qp ensembles with 1D ancillary data didn't work.

  • I created an ensure_2d_array function in dictionary.py to replace np.atleast_2d use in concatenate_dicts
  • new function allows the choice of which axis to add to the array. The default is the previous behaviour (axis=0)
  • in qp.concatentate, the concatenation of ancillary data is called with axis=0
  • added a test to test_factory.py to ensure this was working properly

Code Quality

  • My code follows the code style of this project
  • I have written unit tests or justified all instances of #pragma: no cover; in the case of a bugfix, a new test that breaks as a result of the bug has been added
  • My code contains relevant comments and necessary documentation for future maintainers; the change is reflected in applicable demos/tutorials (with output cleared!) and added/updated docstrings use the NumPy docstring format
  • Any breaking changes, described above, are accompanied by backwards compatibility and deprecation warnings

@eacharles eacharles mentioned this pull request Jan 24, 2026
4 tasks
@eacharles eacharles self-requested a review January 24, 2026 00:47
Copy link
Collaborator

@eacharles eacharles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some stuff to deal with the ppf of the spline, which had some numerical issues.

@jscora jscora merged commit cecc577 into main Jan 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants