A single-domain nanomagnet, shaped like a thin elliptical disk with small eccentricity, has a double-well potential profile with two degenerate energy minima separated by a small barrier of a few kT (k = Boltzmann constant and T = absolute temperature). The two minima correspond to the magnetization pointing along the two mutually anti-parallel directions along the major axis of the ellipse. At room temperature, the magnetization fluctuates randomly between the two minima, mimicking telegraph noise. This makes the nanomagnet act as a "binary" stochastic neuron (BSN) with the neuronal state encoded in the magnetization orientation. If the nanomagnet is magnetostrictive, then the barrier can be depressed further by applying (electrically generated) uniaxial stress along the ellipse's major axis, thereby gradually eroding the double-well shape. When the barrier almost vanishes, the magnetization begins to randomly assume any arbitrary orientation (not just along the major axis), making the nanomagnet act as an "analog" stochastic neuron (ASN). The magnetization fluctuation then begins to increasingly resemble white noise. The full width at half maximum (FWHM) of the noise auto-correlation function decreases with increasing stress, as the fluctuation gradually transforms from telegraph noise to white noise. Consistent with this trend, the noise spectral density exhibits a 1/fβ spectrum (at high frequencies) with β decreasing from 2.00 to 1.88 with increasing stress. Stress can thus not only reconfigure a BSN to an ASN, which has its own applications, but it can also perform "noise engineering", i.e., tune the auto-correlation function and power spectral density, having applications in signal processing.