JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.83k stars 5.49k forks source link

remove `clamp!`? #36038

Open JeffBezanson opened 4 years ago

JeffBezanson commented 4 years ago

This seems to be another one of the straggling few "vectorized" functions. We can consider removing it in 2.0.

KristofferC commented 4 years ago

Was discussed in https://github.com/JuliaLang/julia/issues/22236.

StefanKarpinski commented 4 years ago

To quote my, imo still-relevant comment there:

I have to confess that I don't see the urgency of removing clamp!. It seems occasionally useful and A .= clamp.(A, lo, hi) is a bit less obvious and requires a name for A.