r/Python • • Feb 25 '26

Showcase [ Removed by moderator ]

[removed] — view removed post

119 Upvotes

55 comments sorted by

View all comments

Show parent comments

6

u/tunisia3507 Feb 25 '26

If you're doing numeric operations internally, use numpy inside the map function.

6

u/Zouden Feb 25 '26

That doesn't make sense

3

u/tunisia3507 Feb 25 '26

Imagine you have a list of numpy arrays of different shapes and you want to find the sum of each one. You can't use a single call to a numpy function because the arrays are different shapes. You can use this library to iterate over the list and call numpy.sum on each array.