Implement functions that change array values depending on a condition, without a Python loop. replace_where returns a copy in which the positions selected by a boolean mask take a given value, clip_to_percentiles limits every value to the range between two percentiles of the data (a standard way to tame outliers), sign_class labels each value -1, 0 or 1 by its sign, and bucket_label maps values to three labels using several conditions at once.
No results yet
Run your code to check it against the examples, or submit to run every test.