[BUG] 03_classification.ipynb - Assignment issue between DataFrame to Array
- Dominant language
- Jupyter Notebook
- Stars
- 30k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
I am not a python expert but I realized there is probably a compatibility issue with following code:
```python
%matplotlib inline
import matplotlib as mpl
import matplotlib.pyplot as plt
some_digit = X[0]
some_digit_image = some_digit.reshape(28, 28)
plt.imshow(some_digit_image, cmap=mpl.cm.binary)
plt.axis("off")
save_fig("some_digit_plot")
plt.show()
```
The assignment `some_digit = X[0]` throws an error.
I managed to fix this like this:
```python
%matplotlib inline
import matplotlib as mpl
import matplotlib.pyplot as plt
some_digit = X[0:1]
some_digit_arr = np.asarray(some_digit)
some_digit_image = some_digit_arr.reshape(28, 28)
plt.imshow(some_digit_image, cmap="binary")
plt.axis("off")
save_fig("some_digit_plot")
plt.show()
```
Thank you.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.