Skip to content

Conversation

@amritamishra01
Copy link

Adds a new term entry for logical_or() in PyTorch. This entry introduces the concept of element-wise logical OR operations on tensors, explains the syntax for both the function and tensor method forms, and provides runnable examples demonstrating boolean tensors, integer tensors, and broadcasting behavior. The entry follows the term entry template, content standards, and markdown style guide for PyTorch tensor operations.

@CLAassistant
Copy link

CLAassistant commented Oct 22, 2025

CLA assistant check
All committers have signed the CLA.

@dakshdeepHERE dakshdeepHERE self-assigned this Oct 22, 2025
@dakshdeepHERE dakshdeepHERE added pytorch PyTorch new entry New entry or entries status: under review Issue or PR is currently being reviewed labels Oct 22, 2025
Copy link
Collaborator

@dakshdeepHERE dakshdeepHERE left a comment

Choose a reason for hiding this comment

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

@amritamishra01 the # Example section is missing from this which needs to come in between the Syntax and Codebyte section.

@dakshdeepHERE
Copy link
Collaborator

@amritamishra01 ping me once you do the changes and then we will move this PR ahead for next review.

@dakshdeepHERE dakshdeepHERE linked an issue Oct 22, 2025 that may be closed by this pull request
3 tasks
@amritamishra01
Copy link
Author

Done @dakshdeepHERE — added the # Example section between Syntax and Codebyte

@amritamishra01
Copy link
Author

Hi @dakshdeepHERE,
Could you please review and approve this when you get a chance? It will help count towards my Hacktoberfest contribution. Thank you! 🙌

@@ -0,0 +1,88 @@
---
Copy link
Collaborator

Choose a reason for hiding this comment

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

Meta data is wrong please check the template from Readme file.


1. **Function form:**

```python
Copy link
Collaborator

Choose a reason for hiding this comment

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

use pseudo tag instead of python for syntax


2. **Tensor method form:**

```python
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

This operation can be used either as a function in the torch module or as a tensor method.

## Syntax

Copy link
Collaborator

Choose a reason for hiding this comment

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

Have a small introductory descriptuion here.

- `out` (Tensor, optional): Tensor to store the output.

## Example

Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a description here

print(x.logical_or(y))
# Output: tensor([True, False, True, True])
```

Copy link
Collaborator

Choose a reason for hiding this comment

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

Add the output block for example section here

Copy link
Collaborator

@dakshdeepHERE dakshdeepHERE left a comment

Choose a reason for hiding this comment

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

I have few more changes for you to work on @amritamishra01 :)

@dakshdeepHERE dakshdeepHERE added hacktoberfest hacktoberfest-accepted Indicates the PR was approved, merged, and pertains to Hacktoberfest labels Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest hacktoberfest-accepted Indicates the PR was approved, merged, and pertains to Hacktoberfest new entry New entry or entries pytorch PyTorch status: review 1️⃣ completed status: waiting for author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Term Entry] PyTorch Tensor Operations: .logical_or()

3 participants