-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
I find this a bit annoying, because I'm used to use the exponent notation to declare large numbers. Of course I could do zeros(10^4) but I think it should also work with 1e4.
The problem is that 1e4 is a float and 10^4 an int, and that Array doesn't accept floats for dimensional arguments.
Is there any problems with trying to convert floats to int when declaring arrays ? I think it would simplify things quite a bit, and it seems safe to me, since convert will give an InexactError when trying to declare an array with 10.5 elements.
It would also solve this kind of weird behavior:
julia> zeros(100/10)
ERROR: no method Array(DataType,Float64)
in zeros at array.jl:205
Metadata
Metadata
Assignees
Labels
No labels