fix Issue #92
This commit is contained in:
@@ -664,7 +664,7 @@
|
|||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"#### 36. Extract the integer part of a random array using 5 different methods (★★☆)"
|
"#### 36. Extract the integer part of a random array of positive numbers using 4 different methods (★★☆)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -677,7 +677,6 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"print (Z - Z%1)\n",
|
"print (Z - Z%1)\n",
|
||||||
"print (np.floor(Z))\n",
|
"print (np.floor(Z))\n",
|
||||||
"print (np.ceil(Z)-1)\n",
|
|
||||||
"print (Z.astype(int))\n",
|
"print (Z.astype(int))\n",
|
||||||
"print (np.trunc(Z))"
|
"print (np.trunc(Z))"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ np.negative(A,out=A)
|
|||||||
np.multiply(A,B,out=A)
|
np.multiply(A,B,out=A)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 36. Extract the integer part of a random array using 5 different methods (★★☆)
|
#### 36. Extract the integer part of a random array of positive numbers using 4 different methods (★★☆)
|
||||||
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
@@ -340,7 +340,6 @@ 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))
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -637,7 +637,7 @@
|
|||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"#### 36. Extract the integer part of a random array using 5 different methods (★★☆)"
|
"#### 36. Extract the integer part of a random array of positive numbers using 4 different methods (★★☆)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ np.sqrt(-1) == np.emath.sqrt(-1)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### 36. Extract the integer part of a random array using 5 different methods (★★☆)
|
#### 36. Extract the integer part of a random array of positive numbers using 4 different methods (★★☆)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -610,8 +610,8 @@
|
|||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"#### 36. Extract the integer part of a random array using 5 different methods (★★☆) \n",
|
"#### 36. Extract the integer part of a random array of positive numbers using 4 different methods (★★☆) \n",
|
||||||
"(**hint**: %, np.floor, np.ceil, astype, np.trunc)"
|
"(**hint**: %, np.floor, astype, np.trunc)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -247,9 +247,9 @@ np.sqrt(-1) == np.emath.sqrt(-1)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### 36. Extract the integer part of a random array using 5 different methods (★★☆)
|
#### 36. Extract the integer part of a random array of positive numbers using 4 different methods (★★☆)
|
||||||
|
|
||||||
(**hint**: %, np.floor, np.ceil, astype, np.trunc)
|
(**hint**: %, np.floor, astype, np.trunc)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user