Skip to content

Conversation

mruberry
Copy link
Collaborator

This PR adds the following aliaes:

  • not_equal for torch.ne
  • greater for torch.gt
  • greater_equal for torch.ge
  • less for torch.lt
  • less_equal for torch.le

This aliases are consistent with NumPy's naming for these functions.

@mruberry mruberry requested a review from apaszke as a code owner August 31, 2020 04:32
@mruberry mruberry added the module: numpy Related to numpy support, and also numpy compatibility of our operators label Aug 31, 2020
@mruberry mruberry removed the request for review from apaszke August 31, 2020 04:32
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Aug 31, 2020
@dr-ci
Copy link

dr-ci bot commented Aug 31, 2020

💊 CI failures summary and remediations

As of commit 3ce8bad (more details on the Dr. CI page):



🚧 3 fixed upstream failures:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

If your commit is newer than viable/strict, you can try basing on an older, stable commit:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase --onto FETCH_HEAD $(git merge-base origin/master HEAD)

If your commit is older than viable/strict:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

Check out the recency history of this "viable master" tracking branch.


ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 9 times.

@mruberry mruberry requested review from ngimel and gchanan August 31, 2020 07:06
add_docstr(torch.less_equal, r"""
less_equal(input, other, *, out=None) -> Tensor

Alias for :func:`torch.le`.
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we describe the alias in this direction and not the other?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You mean, why doesn't the torch.le docstring say that it has an alias, torch.less_equal? We could do that.

Copy link
Contributor

Choose a reason for hiding this comment

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

right, that's what I was asking. Which do we "prefer"

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@mruberry merged this pull request in 83a6e7d.

@facebook-github-bot facebook-github-bot deleted the inequality_aliases branch January 27, 2021 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merged module: numpy Related to numpy support, and also numpy compatibility of our operators oncall: jit Add this issue/PR to JIT oncall triage queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants