fix issue #92
This commit is contained in:
@@ -423,17 +423,16 @@ np.negative(A,out=A)
|
|||||||
np.multiply(A,B,out=A)
|
np.multiply(A,B,out=A)
|
||||||
|
|
||||||
< q36
|
< 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
|
< h36
|
||||||
hint: %, np.floor, np.ceil, astype, np.trunc
|
hint: %, np.floor, astype, np.trunc
|
||||||
|
|
||||||
< a36
|
< a36
|
||||||
Z = np.random.uniform(0,10,10)
|
Z = np.random.uniform(0,10,10)
|
||||||
|
|
||||||
print (Z - Z%1)
|
print (Z - Z%1)
|
||||||
print (np.floor(Z))
|
print (np.floor(Z))
|
||||||
print (np.ceil(Z)-1)
|
|
||||||
print (Z.astype(int))
|
print (Z.astype(int))
|
||||||
print (np.trunc(Z))
|
print (np.trunc(Z))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user