Merge pull request #105 from zhukpm/i92

fix issue #92
This commit is contained in:
Nicolas P. Rougier 2020-03-10 11:27:11 +01:00 committed by GitHub
commit ae125e2592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -423,17 +423,16 @@ np.negative(A,out=A)
np.multiply(A,B,out=A)
< q36
Extract the integer part of a random array using 5 different methods (★★☆)
Extract the integer part of a random array of positive numbers using 4 different methods (★★☆)
< h36
hint: %, np.floor, np.ceil, astype, np.trunc
hint: %, np.floor, astype, np.trunc
< a36
Z = np.random.uniform(0,10,10)
print (Z - Z%1)
print (np.floor(Z))
print (np.ceil(Z)-1)
print (Z.astype(int))
print (np.trunc(Z))