Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix signature for MersenneTwister #228

Merged
merged 2 commits into from
Jul 6, 2020
Merged

Conversation

sethaxen
Copy link
Member

@sethaxen sethaxen commented Jul 6, 2020

This PR (probably) fixes #227. typeof(MersenneTwister) is DataType, so the rules introduced in #223 will be applied to many function calls.

@baggepinnen can you confirm this resolves the issue for you?

@simeonschaub
Copy link
Member

Would it be possible to add a test for this?

@nickrobinson251
Copy link
Contributor

While fixing-up this code, would you mind also changing MersenneTwister_rrule -> MersenneTwister_pullback, to match the style elsewhere in the package?

@nickrobinson251
Copy link
Contributor

nickrobinson251 commented Jul 6, 2020

I think this fix is pretty hard to test. We'd need to test that we didn't accidentally define a rule for DataType. And given this is breaking the Zygote tests I think it'd be good to merge the fix asap (presuming we've verified this does indeed fix the problem). A possible solution to the testing issue is #229.

@nickrobinson251
Copy link
Contributor

This fixes the issue for me, so i'll just merge and make a release since it's affecting Zygote and Flux. Thanks @sethaxen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no method matching MersenneTwister(::typeof(abs2), ::Array{Complex{Float64},1})
3 participants