Return cups with every value below 100 raised up to exactly 100, leaving the re…
NumPy · from Vectorisation and ufuncs
elementwise opsnp.sqrtnp.wherenp.maximum+=out=Putting the kettle on…
Starting up…
Exercise 3
Return cups with every value below 100 raised up to exactly 100, leaving the rest alone.
your answer
stuck? the lesson behind it
Vectorisation and ufuncs
The loop doesn’t disappear — it moves somewhere much faster.