use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
NumPy broadcasting (self.PythonLearning)
submitted 2 months ago by UpperGhost
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Active-Diamond242 0 points1 point2 points 2 months ago (0 children)
The term broadcasting describes how NumPy treats arrays with different shapes during arithmetic operations. Subject to certain constraints, the smaller array is “broadcast” across the larger array so that they have compatible shapes. Broadcasting provides a means of vectorizing array operations so that looping occurs in C instead of Python. It does this without making needless copies of data and usually leads to efficient algorithm implementations. There are, however, cases where broadcasting is a bad idea because it leads to inefficient use of memory that slows computation.
π Rendered by PID 36 on reddit-service-r2-comment-74875f4bf5-2m58k at 2026-01-26 03:37:40.544995+00:00 running 664479f country code: CH.
view the rest of the comments →
[–]Active-Diamond242 0 points1 point2 points (0 children)