You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a nitpick: the map operation is not idiomatic numpy; normally you would just do np.sin(array) + 1, as you're surely aware. maybe it would be instructive adding that result for comparison?
another interesting performance test may be something that involves taking slices and iterating over them along various dimensions, forcing iteration over non-contiguous memory?
The text was updated successfully, but these errors were encountered:
a nitpick: the map operation is not idiomatic numpy; normally you would just do np.sin(array) + 1, as you're surely aware. maybe it would be instructive adding that result for comparison?
Yes, you are right. sine function has already been vectorised in Numpy. My example in the test was not very nice actually :) I added some explanation to clarify the point: whenever we have to plug in our own function which may not have a vectorised version in Numpy, Python can be very slow.
another interesting performance test may be something that involves taking slices and iterating over them along various dimensions, forcing iteration over non-contiguous memory?
This is a good idea. I will try to do some tests whenever I have some free time. Thanks again.
a nitpick: the map operation is not idiomatic numpy; normally you would just do
np.sin(array) + 1
, as you're surely aware. maybe it would be instructive adding that result for comparison?another interesting performance test may be something that involves taking slices and iterating over them along various dimensions, forcing iteration over non-contiguous memory?
The text was updated successfully, but these errors were encountered: