I have one simple program below:
import numpy as np
arr = np.random.randn(8)
new = arr.sort()
new1 = np.sort(arr)
print new
print new1
I expected the two new arrays to be the same a sorted array, but instead, new is None, new1 is what I expected, what is the difference between two methods to sort?
Aucun commentaire:
Enregistrer un commentaire