Solve the System
Return the vector x that solves a @ x = b, where a is a square matrix with exactly one solution.
Example 1
a [[2,0],[0,4]]
b [6,8]
returns [3.0,2.0]
2x = 6 and 4y = 8.
Constraints
aisnbynwith1 <= n <= 5
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More SciPy problems
- Value in BetweenEasy
- Are They IndependentMedium
- Break-Even RateMedium
- Cheapest PairingMedium
- Do the Groups DifferMedium
- Fit the DecayMedium
- Is the Mean DifferentMedium
- Lowest PointMedium