Replace the missing (NaN) entries of a numeric vector with the median of the observed entries.
Implement solve(x).
Returns. Return a new NumPy array; the input is not modified.
Example 1
Input:
solve([1.0, np.nan, 3.0, 100.0])
Output:
[1.0, 3.0, 3.0, 100.0]
Example 2
Input:
solve([2.0, 4.0, np.nan, 10.0])
Output:
[2.0, 4.0, 4.0, 10.0]
No results yet
Run your code to check it against the examples, or submit to run every test.