Skip to content

Conversation

@Ananya44444
Copy link
Contributor

Description

This PR adds a new entry for the .nbytes attribute of a NumPy ndarray.

The new file is located at content/numpy/concepts/ndarray/terms/nbytes/nbytes.md.

It explains:

  1. What the .nbytes attribute represents (total bytes consumed by array elements).
  2. Its syntax.
  3. An example using np.arange to show its calculation (size * itemsize).
  4. A Codebyte example showing its use on a 2D array with a specific dtype (float32).

Issue Solved

Issue #7825

Type of Change

  • Adding a new entry

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • I have linked any issues that are relevant to this PR in the Issues Solved section.

@CLAassistant
Copy link

CLAassistant commented Oct 24, 2025

CLA assistant check
All committers have signed the CLA.

@mamtawardhani mamtawardhani self-assigned this Oct 25, 2025
Updated the description and parameters for the .nbytes attribute in the NumPy documentation. Improved clarity and consistency in examples.
Updated the description of the `.nbytes` attribute to include a link to the NumPy array documentation.
Copy link
Collaborator

@mamtawardhani mamtawardhani left a comment

Choose a reason for hiding this comment

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

Looks good for a second review! 🚀

@mamtawardhani mamtawardhani linked an issue Oct 25, 2025 that may be closed by this pull request
3 tasks
@avdhoottt avdhoottt added status: under review Issue or PR is currently being reviewed and removed status: ready for next review labels Oct 27, 2025
Copy link
Collaborator

@avdhoottt avdhoottt left a comment

Choose a reason for hiding this comment

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

Excellent entry, LGTM!!

@avdhoottt avdhoottt added hacktoberfest status: review 2️⃣ completed hacktoberfest-accepted Indicates the PR was approved, merged, and pertains to Hacktoberfest and removed status: under review Issue or PR is currently being reviewed labels Oct 29, 2025
@avdhoottt avdhoottt merged commit ca80eb6 into Codecademy:main Oct 29, 2025
7 checks passed
@github-actions
Copy link

👋 @Ananya44444
You have contributed to Codecademy Docs, and we would like to know more about you and your experience.
Please take a minute to fill out this four question survey to help us better understand Docs contributions and how we can improve the experience for you and our learners.
Thank you for your help!

🎉 Your contribution(s) can be seen here:

https://www.codecademy.com/resources/docs/numpy/ndarray/nbytes

Please note it may take a little while for changes to become visible.
If you're appearing as anonymous and want to be credited, visit the linked accounts page and ensure that your GitHub account is linked.

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 numpy NumPy entries python Python entries status: review 1️⃣ completed status: review 2️⃣ completed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Term Entry] Python NumPy - ndarray: nbytes

4 participants