Skip to content

handles empty arrays in join_many #3211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 3, 2022

Conversation

syurkevi
Copy link
Contributor

@syurkevi syurkevi commented Feb 4, 2022

af_join_many() would throw an exception when passed empty arrays. This was inconsistent with af_join().
With this PR, af_join_many() will ignore empty arrays.

  • Is this a new feature or a bug fix?
    bug fix
  • More detail if necessary to describe all commits in pull request.
    Now that empty arrays are allowed, the first non-empty array must be used for assertions.
    Internal API has slightly changed to accept pre-allocated array. More functions will be moving to this style.
  • Future changes not implemented in this PR.
    internal API of af_join() doesn't yet match af_join_many(&out)

Fixes: #3209

Changes to Users

No changes to existing code should be necessary, but join() with multiple arrays will now handle empty arrays.

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • Functions added to unified API
  • Functions documented

@umar456 umar456 merged commit 259c2ff into arrayfire:master Mar 3, 2022
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.

af_join vs af_join_many inconsistent empty array behavior[BUG]
2 participants