HF RL Explorer

Task: Extract Values Along an Arbitrary Line from a NumPy Array

Task: Extract Values Along an Arbitrary Line from a NumPy Array: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script that extracts pixel/value profiles along an arbitrary line between two points in a 2D NumPy array. The solution should handle lines at any angle (not just horizontal…

The task

Write a Python script that extracts pixel/value profiles along an arbitrary line between two points in a 2D NumPy array. The solution should handle lines at any angle (not just horizontal or vertical slices).

Part of PrimeIntellect/Terminal-Lego-15k.