This project is part of the linear_algebra directory within the atlas-machine_learning repository. The goal of the task is to practice Python slicing operations on arrays, specifically to extract subsets of data without using loops or conditionals.
In this task, the array slicing operations are implemented to:
- Extract the first two numbers of the array.
- Extract the last five numbers of the array.
- Extract the 2nd through 6th numbers of the array.
The solution follows all guidelines provided, including:
- No loops or conditionals are used.
- The script is exactly 8 lines long.
- The task adheres to
pycodestyle
formatting standards.
- 0-slice_me_up.py: The main Python script containing the slicing operations.
- README.md: This file, providing an overview of the project and task.
- Python 3.9
- Numpy (version 1.25.2)
- Ubuntu 20.04 LTS
- Files should be executable
- Follow
pycodestyle
(version 2.11.1) guidelines
- Navigate to the
math/linear_algebra
directory. - Make sure the file is executable:
chmod +x 0-slice_me_up.py
Run the script: bash Copy code ./0-slice_me_up.py