Closed jarrodmillman closed 1 year ago
This is fine as a technical fix, although thinking about thge pedagogical value of taking log(sin(...))
is dubious. A much more common operation is log of exp, so perhaps we could replace sin
with exp, and make the numbers negative:
np.log(np.exp(np.arange(-10, -100, -10)))
Or, another one that may provide even more insight:
np.log10(np.logspace(-10, -100))
Isn't this just the log of np.arange(5)[1:]
? And not log of np.sin(np.arange(5))[1:]
.
I see; well, the principle holds, we can just transform the numbers into something that has a valid log. E.g., a_exp = np.exp(a) and then take the log of that to get back to the original numbers.
Avoid