Return cups converted to float32, then its nbytes — half what float64 would take

NumPy · from Making it fast

out=in-place opsnp.vectorizetemporarieswhere=contiguityfloat32

Putting the kettle on…

Starting up…

Exercise 2

Return cups converted to float32, then its nbytes — half what float64 would take.

your answer
stuck? the lesson behind it
Making it fast
Kill the loops, stop copying, reuse buffers — in that order.