mirror of https://github.com/01-edu/Branch-AI.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
586 B
21 lines
586 B
2 years ago
|
# Exercise 1 Your first NumPy array
|
||
|
|
||
|
The goal of this exercise is to use many Python data types in **NumPy** arrays. **NumPy** arrays are intensively used in **NumPy** and **Pandas**. They are flexible and allow to use optimized **NumPy** underlying functions.
|
||
|
|
||
|
1. Create a NumPy array that contains: an integer, a float, a string, a dictionary, a list, a tuple, a set and a boolean.
|
||
|
|
||
|
The expected output is:
|
||
|
|
||
|
```python
|
||
|
for i in your_np_array:
|
||
|
print(type(i))
|
||
|
|
||
|
<class 'int'>
|
||
|
<class 'float'>
|
||
|
<class 'str'>
|
||
|
<class 'dict'>
|
||
|
<class 'list'>
|
||
|
<class 'tuple'>
|
||
|
<class 'set'>
|
||
|
<class 'bool'>
|
||
|
```
|