60 Mins

Milestone 1: Sensor Array Grid Setup

Configuring the Casford Sensor Coordinate Space

Your first mission in the Casford Analytics Engine is to initialize the spatial coordinate grid. The engine requires a two-dimensional plane defined by discrete sensor intervals along both the X and Y axes. You must establish a coordinate space spanning from -50 to 50 on both axes with a resolution of 1 unit per increment.

Utilize the NumPy range routines to generate the base vectors for these axes and then transform them into a broadcastable grid. This grid will serve as the foundation for all subsequent sensor field calculations within the engine.

Operator Note: Ensure your stop value in np.arange is 51 to include the coordinate 50, as the stop value is exclusive.
Python 3
import numpy as np

# Step 1: Define the range bounds for the grid
axis_range = np.arange(-50, 51, 1)

# Step 2: Create the coordinate mesh
x_grid, y_grid = np.meshgrid(axis_range, axis_range)

print(f'Grid shape: {x_grid.shape}')
print(f'Sample coordinate at index (0,0): ({x_grid[0,0]}, {y_grid[0,0]})')
Lab Overview

Objectives & Tasks

Review the tasks below and follow the interactive instructions to complete this module.

Knowledge Check

Ready to test your understanding of Milestone 1: Sensor Array Grid Setup?

Previous
5. Basic Indexing and Slicing
Locked
Complete Challenge to Unlock
Back