0
Guck mal auf dieser Seite (besonders im Abschnitt "Broadcastable arrays"):
https://numpy.org/devdocs/user/basics.broadcasting.html
NumPy verwendet unterliegend eine mglw. effizientere Implementierung als die Schleife in Python.
Siehe https://numpy.org/doc/stable/user/basics.broadcasting.html
"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."
Diese Antwort melden
Link
geantwortet
b15g
Punkte: 30
Punkte: 30