Created
September 12, 2012 01:20
-
-
Save compressed/3703480 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> type MyType | |
f::Function | |
end | |
julia> MyType() = MyType(() -> randi(2000)/1000.0 - 1) | |
julia> s = MyType() | |
MyType(#<function>) | |
julia> [s.f() for j=1:10] | |
10-element Any Array: | |
0.687 | |
-0.686 | |
-0.221 | |
-0.156 | |
-0.111 | |
0.774 | |
-0.728 | |
-0.7 | |
0.237 | |
-0.24 | |
# How do I change from 'Any' array to 'Float64'? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment