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.
18 lines
491 B
18 lines
491 B
2 years ago
|
# Exercise 5: Split, concatenate, reshape arrays
|
||
|
|
||
|
The goal of this exercise is to learn to concatenate and reshape arrays.
|
||
|
|
||
|
1. Generate an array with integers from 1 to 50: `array([1,...,50])`
|
||
|
|
||
|
2. Generate an array with integers from 51 to 100: `array([51,...,100])`
|
||
|
|
||
|
3. Using `np.concatenate`, concatenate the two arrays into: `array([1,...,100])`
|
||
|
|
||
|
4. Reshape the previous array into:
|
||
|
|
||
|
```console
|
||
|
array([[ 1, ... , 10],
|
||
|
...
|
||
|
[ 91, ... , 100]])
|
||
|
```
|