Update testScalarFields.py

Check on line 19 (if device.cpu) not working on my installation (Tesla M2075)