Closed jlperla closed 6 years ago
Good catch. Let me investigate.
cc: @jlperla
So first impression is that this stuff is already in the tests:
@test expectation(x -> x, testDist7, z) == E_9(x -> x) # Grid one.
@test expectation(x -> x, testDist4) == E_4(x -> x) # Standard normal/Gaussian continuous.
@test expectation(x -> x, testDist) == E_1(x -> x) # Discrete one.
I wonder why this is broken for you. Could it be an old copy of the package?
And agreed re your other changes. Good idea for the package to be minimally disruptive to what the user is doing.
Closing because I tested on my machine (1.0.0, because Arpack
or something required it), and it worked.
On a fresh v0.7 installation, I do not have that problem. Who knows.
On v0.7
I would add these sorts of things to the tests. Should https://github.com/econtoolkit/Expectations.jl/blob/master/src/iterable.jl#L273 perhaps be calling
_expectation
instead ofexpectation
?I would remove the
_expectation
export from https://github.com/econtoolkit/Expectations.jl/blob/master/src/Expectations.jl since it is a private function. Finally, are you sure we want to do the following? If the tests pass, I think it may be better to let the users of the library deal with their namespaces.