Look up positional embeddings: from a learned table with one row per position, return the first length rows. length must be between 0 and the number of rows, otherwise ValueError.
Implement solve(embeddings, length).
Returns. Return a copy of table[:length].
Example 1
Input:
solve([[0, 0], [1, 1], [2, 2]], 2)
Output:
[[0, 0], [1, 1]]
Example 2
Input:
solve([[2, 3], [4, 5]], 1)
Output:
[[2, 3]]
No results yet
Run your code to check it against the examples, or submit to run every test.