numpy array heaviside float values to 0 or 1

Solutions on MaxInterview for numpy array heaviside float values to 0 or 1 by the best coders in the world