Compare commits
3 Commits
bc7d42eb84
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3beca2d7f | ||
|
|
7dcb112f80 | ||
|
|
6c091f3a12 |
File diff suppressed because it is too large
Load Diff
@@ -494,11 +494,11 @@ print(Z[index])
|
||||
`hint: dtype`
|
||||
|
||||
```python
|
||||
Z = np.zeros(10, [ ('position', [ ('x', float, 1),
|
||||
('y', float, 1)]),
|
||||
('color', [ ('r', float, 1),
|
||||
('g', float, 1),
|
||||
('b', float, 1)])])
|
||||
Z = np.zeros(10, [ ('position', [ ('x', float),
|
||||
('y', float)]),
|
||||
('color', [ ('r', float),
|
||||
('g', float),
|
||||
('b', float)])])
|
||||
print(Z)
|
||||
```
|
||||
#### 52. Consider a random vector with shape (100,2) representing coordinates, find point by point distances (★★☆)
|
||||
|
||||
@@ -494,11 +494,11 @@ print(Z[index])
|
||||
|
||||
|
||||
```python
|
||||
Z = np.zeros(10, [ ('position', [ ('x', float, 1),
|
||||
('y', float, 1)]),
|
||||
('color', [ ('r', float, 1),
|
||||
('g', float, 1),
|
||||
('b', float, 1)])])
|
||||
Z = np.zeros(10, [ ('position', [ ('x', float),
|
||||
('y', float)]),
|
||||
('color', [ ('r', float),
|
||||
('g', float),
|
||||
('b', float)])])
|
||||
print(Z)
|
||||
```
|
||||
#### 52. Consider a random vector with shape (100,2) representing coordinates, find point by point distances (★★☆)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4a87d009",
|
||||
"id": "261c7cb9",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 100 numpy exercises\n",
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "16b631f6",
|
||||
"id": "b0ffec6a",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"File automatically generated. See the documentation to update questions/answers/hints programmatically."
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "8c00c264",
|
||||
"id": "30434163",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"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",
|
||||
"execution_count": null,
|
||||
"id": "c5fa0b45",
|
||||
"id": "8f632d6c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -46,7 +46,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "6c4f9753",
|
||||
"id": "6cfc4341",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
||||
@@ -633,11 +633,11 @@ Create a structured array representing a position (x,y) and a color (r,g,b) (★
|
||||
hint: dtype
|
||||
|
||||
< a51
|
||||
Z = np.zeros(10, [ ('position', [ ('x', float, 1),
|
||||
('y', float, 1)]),
|
||||
('color', [ ('r', float, 1),
|
||||
('g', float, 1),
|
||||
('b', float, 1)])])
|
||||
Z = np.zeros(10, [ ('position', [ ('x', float),
|
||||
('y', float)]),
|
||||
('color', [ ('r', float),
|
||||
('g', float),
|
||||
('b', float)])])
|
||||
print(Z)
|
||||
|
||||
< q52
|
||||
|
||||
Reference in New Issue
Block a user