solution only works for a 1d array

This commit is contained in:
chrisjdavie committed 2017-05-25 15:25:13 +00:00
1 parent f440691a50
commit d130d89a48
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -860,7 +860,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### 50. How to find the closest value (to a given scalar) in an array? (★★☆)"
"#### 50. How to find the closest value (to a given scalar) in a vector? (★★☆)"
]
},
{
+1 -1
View File
@@ -236,7 +236,7 @@ np.sqrt(-1) == np.emath.sqrt(-1)
#### 50. How to find the closest value (to a given scalar) in an array? (★★☆)
#### 50. How to find the closest value (to a given scalar) in a vector? (★★☆)
+1 -1
View File
@@ -1028,7 +1028,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### 50. How to find the closest value (to a given scalar) in an array? (★★☆)"
"#### 50. How to find the closest value (to a given scalar) in a vector? (★★☆)"
]
},
{
+1 -1
View File
@@ -482,7 +482,7 @@ Z = np.zeros((16,16))
print(Z)
```
#### 50. How to find the closest value (to a given scalar) in an array? (★★☆)
#### 50. How to find the closest value (to a given scalar) in a vector? (★★☆)
```python