solutions update from 9642cab
This commit is contained in:
committed by
github-actions[bot]
parent
9642cab77c
commit
6447594ad6
File diff suppressed because it is too large
Load Diff
@@ -548,7 +548,7 @@ s = StringIO('''1, 2, 3, 4, 5
|
|||||||
|
|
||||||
, , 9,10,11
|
, , 9,10,11
|
||||||
''')
|
''')
|
||||||
Z = np.genfromtxt(s, delimiter=",", dtype=np.int)
|
Z = np.genfromtxt(s, delimiter=",", dtype = int, filling_values = 0)
|
||||||
print(Z)
|
print(Z)
|
||||||
```
|
```
|
||||||
#### 55. What is the equivalent of enumerate for numpy arrays? (★★☆)
|
#### 55. What is the equivalent of enumerate for numpy arrays? (★★☆)
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ s = StringIO('''1, 2, 3, 4, 5
|
|||||||
|
|
||||||
, , 9,10,11
|
, , 9,10,11
|
||||||
''')
|
''')
|
||||||
Z = np.genfromtxt(s, delimiter=",", dtype=np.int)
|
Z = np.genfromtxt(s, delimiter=",", dtype = int, filling_values = 0)
|
||||||
print(Z)
|
print(Z)
|
||||||
```
|
```
|
||||||
#### 55. What is the equivalent of enumerate for numpy arrays? (★★☆)
|
#### 55. What is the equivalent of enumerate for numpy arrays? (★★☆)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "af9e3994",
|
"id": "21aee2db",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"# 100 numpy exercises\n",
|
"# 100 numpy exercises\n",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "76e99d49",
|
"id": "9ba95040",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"File automatically generated. See the documentation to update questions/answers/hints programmatically."
|
"File automatically generated. See the documentation to update questions/answers/hints programmatically."
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "8a54b21a",
|
"id": "d2c26b77",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"Run the `initialise.py` module, then call a random question with `pick()` an hint towards its solution with\n",
|
"Run the `initialise.py` module, then call a random question with `pick()` an hint towards its solution with\n",
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"id": "670bb646",
|
"id": "2fbe49f5",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"id": "4ff49967",
|
"id": "8a120f51",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
|||||||
Reference in New Issue
Block a user