When you have comprehensions, it will help to write T[ f(x) for x in v ]
instead of [ f(x) for x in v ] We have an a couple of open issues that would help this, but at this point it's a bit of an issue in global scope. Related issues: https://github.com/JuliaLang/julia/issues/5843 https://github.com/JuliaLang/julia/issues/7258 https://github.com/JuliaLang/julia/issues/964 (making globals implicitly type-const would help a lot) On Fri, Jun 13, 2014 at 6:31 PM, Rich Morin <[email protected]> wrote: > On Jun 13, 2014, at 13:05, Blake Johnson wrote: > > I mean, after constructing data_list try: > > println(typeof(data_list)) > > > > To see what actual type you are getting. Sometimes list comprehensions > > can't figure out a tight type, and you'll get an Array{Any,1}. > > Here's a fairly complete list of suspects: > > data_list: Array{Any,1} > full_list: Array{Any,1} > full_str: UTF8String > parm_hash: Dict{Any,Any} > prop_list: Array{Any,1} > > I'd welcome advice on how to tighten up these types (complete Julia > newbie here :-), as well as hints on how to reduce allocation and > deallocation. > > -r > > -- > http://www.cfcl.com/rdm Rich Morin [email protected] > http://www.cfcl.com/rdm/resume San Bruno, CA, USA +1 650-873-7841 > > Software system design, development, and documentation > > >
