fix spelling error; suggestion for an alternative answer generating one less element, but obviously no great computational advantage
This commit is contained in:
@@ -721,7 +721,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"#### 39. Create a vector of size 10 with values ranging from 0 to 1, both excluded (★★☆) \n",
|
"#### 39. Create a vector of size 10 with values ranging from 0 to 1, both excluded (★★☆) \n",
|
||||||
"(**hint**: np.linespace)"
|
"(**hint**: np.linspace)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ np.sqrt(-1) == np.emath.sqrt(-1)
|
|||||||
|
|
||||||
#### 39. Create a vector of size 10 with values ranging from 0 to 1, both excluded (★★☆)
|
#### 39. Create a vector of size 10 with values ranging from 0 to 1, both excluded (★★☆)
|
||||||
|
|
||||||
(**hint**: np.linespace)
|
(**hint**: np.linspace)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -801,7 +801,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"Z = np.linspace(0,1,12,endpoint=True)[1:-1]\n",
|
"Z = np.linspace(0,1,11,endpoint=False)[1:]\n",
|
||||||
"print(Z)"
|
"print(Z)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ print(Z)
|
|||||||
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
Z = np.linspace(0,1,12,endpoint=True)[1:-1]
|
Z = np.linspace(0,1,11,endpoint=False)[1:]
|
||||||
print(Z)
|
print(Z)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user