Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: Add examples to broadcasting documentation for 2D and 3D array cases #28891

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yamato1936
Copy link

This pull request adds two new examples to doc/source/user/basics.broadcasting.rst to provide additional clarity on how broadcasting works in NumPy.

Added Examples:

  • Broadcasting (3, 1) and (1, 4)
    Demonstrates how arrays with shapes (3, 1) and (1, 4) broadcast to shape (3, 4).

  • Broadcasting (2, 3, 1) and (3, 4)
    Explains how a (2, 3, 1) array and a (3, 4) array broadcast to shape (2, 3, 4).

Purpose:

These examples are intended to help users—especially those new to broadcasting—better understand how NumPy's broadcasting rules apply in practical scenarios.

Notes:

  • Type of change: Documentation-only update
  • No changes were made to the codebase or functionality.

@jorenham jorenham changed the title Add examples to broadcasting documentation for 2D and 3D array cases DOC: Add examples to broadcasting documentation for 2D and 3D array cases May 3, 2025
@melissawm melissawm moved this to Awaiting a code review in NumPy first-time contributor PRs May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Awaiting a code review
Development

Successfully merging this pull request may close these issues.

2 participants