fix issue #92
This commit is contained in:
parent
a1cd0b0b78
commit
c1ebd7f048
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user