Fix deprecation warning from numpy