Fix for np.array deprecation