FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

af_join vs af_join_many inconsistent empty array behavior[BUG] · Issue #3209 · arrayfire/arrayfire · GitHub

Repository navigation

af_join vs af_join_many inconsistent empty array behavior[BUG] #3209

Description

This is a bug with inconsistent behavior between af_join() and af_join_many()
af_join() will retain the original array if the second array is empty
af_join_many() will throw an error if it receives an empty array.
The docs do currently specify "Requires that all dimensions except the join dimension must be the same for all arrays." however we can handle this special case and behavior should be consistent between functions.

Example code snippet for reproducing:

auto a = af::array(); // empty
auto b = af::randu(9);

auto c = af::join(2, a, b); // works


std::vector<af_array> arrs = {a.get(), b.get()};

af_array out = nullptr;
AF_CHECK(af_join_many(&handle, axis, arrs.size(), arrs.data())); // fails with:
// C++ exception with description "ArrayFire Exception (Invalid input size:203):

Activity

  1. self-assigned this
    on Feb 1, 2022
  2. modified the milestones: 3.9.0, 3.8.1 on Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL