2020-04-21 12:42:19 -04:00
|
|
|
---
|
|
|
|
id: 5e9a093a74c4063ca6f7c154
|
|
|
|
title: Numpy Arrays
|
|
|
|
challengeType: 11
|
2020-05-25 19:15:32 +05:30
|
|
|
isHidden: true
|
2020-04-21 12:42:19 -04:00
|
|
|
videoId: VDYVFHBL1AM
|
|
|
|
---
|
|
|
|
|
|
|
|
## Description
|
|
|
|
<section id='description'>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
```yml
|
|
|
|
question:
|
2020-05-28 22:40:36 +09:00
|
|
|
text: |
|
|
|
|
What will the following code print out?:
|
|
|
|
|
|
|
|
```py
|
|
|
|
A = np.array([
|
|
|
|
['a', 'b', 'c'],
|
|
|
|
['d', 'e', 'f'],
|
|
|
|
['g', 'h', 'i']
|
|
|
|
])
|
|
|
|
|
|
|
|
print(A[:, :2])
|
|
|
|
```
|
|
|
|
|
2020-04-21 12:42:19 -04:00
|
|
|
answers:
|
2020-05-28 22:40:36 +09:00
|
|
|
- "[['a' 'b']]"
|
|
|
|
- |
|
|
|
|
```
|
|
|
|
[['b' 'c']
|
|
|
|
['e' 'f']
|
|
|
|
['h' 'i']]
|
|
|
|
```
|
|
|
|
- |
|
|
|
|
```
|
|
|
|
[['a' 'b']
|
|
|
|
['d' 'e']
|
|
|
|
['g' 'h']]
|
|
|
|
```
|
2020-04-21 12:42:19 -04:00
|
|
|
solution: 3
|
|
|
|
```
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|