Skip to content
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

Aryan contri3 #26488

Closed
wants to merge 3 commits into from
Closed

Aryan contri3 #26488

wants to merge 3 commits into from

Conversation

Aryan8912
Copy link

PR Description

Related Issue

Close #23044

Checklist

  • Did you add a function?
  • Did you add the tests?
  • Did you run your tests and are your tests passing?
  • Did pre-commit not fail on any check?
  • Did you follow the steps we provided?

Socials

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks

Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.

Conventional Commit PR Title

In order to be considered for merging, the pull request title must match the specification in conventional commits. You can edit the title in order for this check to pass.
Most often, our PR titles are something like one of these:

  • docs: correct typo in README
  • feat: implement dark mode"
  • fix: correct remove button behavior

Linting Errors

  • Found type "null", must be one of "feat","fix","docs","style","refactor","perf","test","build","ci","chore","revert"
  • No subject found

@ivy-leaves ivy-leaves added Array API Conform to the Array API Standard, created by The Consortium for Python Data API Standards Ivy API Experimental Run CI for testing API experimental/New feature or request labels Oct 2, 2023
@juliagsy juliagsy assigned AnnaTz and unassigned juliagsy Oct 4, 2023
x = ivy.array([1, 2])
y = [ivy.array([[5, 6]]), ivy.array([[7, 8]])]
ivy.vstack((x, y))
ivy.vstack((x, y, x, y))
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @Aryan8912, I think this docstring edit and the edit in the rst file are not related to the PR. We generally want to keep each PR focused on a specific issue. Could you remove those?

@@ -129,7 +152,7 @@ def gather(
batch_dims: int = 0,
out: Optional[JaxArray] = None,
) -> JaxArray:
axis = axis % len(params.shape)
axis = get_positive_axis_for_gather(axis, params.ndim)
batch_dims = batch_dims % len(params.shape)
Copy link
Contributor

Choose a reason for hiding this comment

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

As was discussed on #26624, you will need to make the same change to all backends and also change the default value of the axis argument to 0.

@@ -129,7 +152,7 @@ def gather(
batch_dims: int = 0,
out: Optional[JaxArray] = None,
) -> JaxArray:
axis = axis % len(params.shape)
axis = get_positive_axis_for_gather(axis, params.ndim)
batch_dims = batch_dims % len(params.shape)
ivy.utils.assertions.check_gather_input_valid(params, indices, axis, batch_dims)
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, please make sure to search for all the places that ivy.gather is being used in our codespace and change the axis value as needed.
What I mean is, if ivy.gather is being called using the current default axis value, you will need to set it to axis=-1 to make up for changing the default. I hope this makes sense!

Copy link
Author

Choose a reason for hiding this comment

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

ok will fix it give 2 days

@Ishticode
Copy link
Contributor

Closing this due to inactivity for over 6 months after changes were requested. Please feel free to reopen if you would like to continue working on this. Thank you :)

@Ishticode Ishticode closed this Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Array API Conform to the Array API Standard, created by The Consortium for Python Data API Standards Ivy API Experimental Run CI for testing API experimental/New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Inconsistent axis Normalization in ivy.gather Across Backends
7 participants