Make from_npy as an independent function.