Compare commits
3 Commits
bc7d42eb84
...
a3beca2d7f
| 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`
|
`hint: dtype`
|
||||||
|
|
||||||
```python
|
```python
|
||||||
Z = np.zeros(10, [ ('position', [ ('x', float, 1),
|
Z = np.zeros(10, [ ('position', [ ('x', float),
|
||||||
('y', float, 1)]),
|
('y', float)]),
|
||||||
('color', [ ('r', float, 1),
|
('color', [ ('r', float),
|
||||||
('g', float, 1),
|
('g', float),
|
||||||
('b', float, 1)])])
|
('b', float)])])
|
||||||
print(Z)
|
print(Z)
|
||||||
```
|
```
|
||||||
#### 52. Consider a random vector with shape (100,2) representing coordinates, find point by point distances (★★☆)
|
#### 52. Consider a random vector with shape (100,2) representing coordinates, find point by point distances (★★☆)
|
||||||
|
|||||||
@@ -494,11 +494,11 @@ print(Z[index])
|
|||||||
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
Z = np.zeros(10, [ ('position', [ ('x', float, 1),
|
Z = np.zeros(10, [ ('position', [ ('x', float),
|
||||||
('y', float, 1)]),
|
('y', float)]),
|
||||||
('color', [ ('r', float, 1),
|
('color', [ ('r', float),
|
||||||
('g', float, 1),
|
('g', float),
|
||||||
('b', float, 1)])])
|
('b', float)])])
|
||||||
print(Z)
|
print(Z)
|
||||||
```
|
```
|
||||||
#### 52. Consider a random vector with shape (100,2) representing coordinates, find point by point distances (★★☆)
|
#### 52. Consider a random vector with shape (100,2) representing coordinates, find point by point distances (★★☆)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "4a87d009",
|
"id": "261c7cb9",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"# 100 numpy exercises\n",
|
"# 100 numpy exercises\n",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "16b631f6",
|
"id": "b0ffec6a",
|
||||||
"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": "8c00c264",
|
"id": "30434163",
|
||||||
"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": "c5fa0b45",
|
"id": "8f632d6c",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"id": "6c4f9753",
|
"id": "6cfc4341",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
|||||||
@@ -633,11 +633,11 @@ Create a structured array representing a position (x,y) and a color (r,g,b) (★
|
|||||||
hint: dtype
|
hint: dtype
|
||||||
|
|
||||||
< a51
|
< a51
|
||||||
Z = np.zeros(10, [ ('position', [ ('x', float, 1),
|
Z = np.zeros(10, [ ('position', [ ('x', float),
|
||||||
('y', float, 1)]),
|
('y', float)]),
|
||||||
('color', [ ('r', float, 1),
|
('color', [ ('r', float),
|
||||||
('g', float, 1),
|
('g', float),
|
||||||
('b', float, 1)])])
|
('b', float)])])
|
||||||
print(Z)
|
print(Z)
|
||||||
|
|
||||||
< q52
|
< q52
|
||||||
|
|||||||
Reference in New Issue
Block a user