Updated question 37, keep previous solution for reference
This commit is contained in:
parent
a7c84d5fed
commit
025845ff5c
File diff suppressed because it is too large
Load Diff
@ -354,6 +354,11 @@ print(np.trunc(Z))
|
||||
`hint: np.arange`
|
||||
|
||||
```python
|
||||
Z = np.zeros((5,5))
|
||||
Z += np.arange(5)
|
||||
print(Z)
|
||||
|
||||
# without broadcasting
|
||||
Z = np.tile(np.arange(0, 5), (5,1))
|
||||
print(Z)
|
||||
```
|
||||
|
@ -354,6 +354,11 @@ print(np.trunc(Z))
|
||||
|
||||
|
||||
```python
|
||||
Z = np.zeros((5,5))
|
||||
Z += np.arange(5)
|
||||
print(Z)
|
||||
|
||||
# without broadcasting
|
||||
Z = np.tile(np.arange(0, 5), (5,1))
|
||||
print(Z)
|
||||
```
|
||||
|
@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "68fdc73a",
|
||||
"id": "9187d1fe",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 100 numpy exercises\n",
|
||||
@ -18,7 +18,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "fb354250",
|
||||
"id": "7b3fced0",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"File automatically generated. See the documentation to update questions/answers/hints programmatically."
|
||||
@ -26,7 +26,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a6d059d8",
|
||||
"id": "77575766",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Run the `initialize.py` module, then call a random question with `pick()` an hint towards its solution with\n",
|
||||
@ -36,7 +36,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "390f283b",
|
||||
"id": "bcf0dd93",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -46,7 +46,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "ac498ee7",
|
||||
"id": "f401c090",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
@ -451,6 +451,11 @@ Create a 5x5 matrix with row values ranging from 0 to 4 (★★☆)
|
||||
hint: np.arange
|
||||
|
||||
< a37
|
||||
Z = np.zeros((5,5))
|
||||
Z += np.arange(5)
|
||||
print(Z)
|
||||
|
||||
# without broadcasting
|
||||
Z = np.tile(np.arange(0, 5), (5,1))
|
||||
print(Z)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user