Nature Reviews Physics: Machine learning in astrophysics and cosmology