Re: [julia-users] Julia crashes on using PyPlot after workspace() on Mac OSX Yosemite

2016-10-20 Thread Vishnu Raj
Thanks Yu!
Seems like there is no fix :(

On Thursday, October 20, 2016 at 1:10:05 PM UTC+5:30, Yichao Yu wrote:
>
> https://github.com/JuliaLang/julia/issues/16467
>
> On Thu, Oct 20, 2016 at 3:10 AM, Vishnu Raj  > wrote:
>
>> Hi,
>>
>> I'm in OSX 10.10 and is facing the following problem. First I import 
>> PyPlot by 'using PyPlot' and plot some stuff, it works. Now if i call a 
>> workspace() and try 'using PyPlot', julia crashes. Below is a sample log
>>
>> $ julia
>>_
>>_   _ _(_)_ |  A fresh approach to technical computing
>>   (_) | (_) (_)|  Documentation: http://docs.julialang.org
>>_ _   _| |_  __ _   |  Type "?help" for help.
>>   | | | | | | |/ _` |  |
>>   | | |_| | | | (_| |  |  Version 0.5.0 (2016-09-19 18:14 UTC)
>>  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
>> |__/   |  x86_64-apple-darwin13.4.0
>>
>> *julia> versioninfo()*
>> Julia Version 0.5.0
>> Commit 3c9d753 (2016-09-19 18:14 UTC)
>> Platform Info:
>>   System: Darwin (x86_64-apple-darwin13.4.0)
>>   CPU: Intel(R) Core(TM) i5-4570R CPU @ 2.70GHz
>>   WORD_SIZE: 64
>>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
>>   LAPACK: libopenblas64_
>>   LIBM: libopenlibm
>>   LLVM: libLLVM-3.7.1 (ORCJIT, haswell)
>>
>> *julia> using PyPlot*
>>
>> *julia> plot( 1:10, 1:3:30 )*
>> 1-element Array{Any,1}:
>>  PyObject 
>>
>> julia> close()
>>
>> *julia> workspace()*
>>
>> *julia> using PyPlot*
>> WARNING: Method definition redirect_stdout(Function, Any) in module 
>> Compat at /Users/vish/.julia/v0.5/Compat/src/Compat.jl:1600 overwritten in 
>> module Compat at /Users/vish/.julia/v0.5/Compat/src/Compat.jl:1600.
>> WARNING: Method definition isnull(Any) in module Compat at 
>> /Users/vish/.julia/v0.5/Compat/src/Compat.jl:1678 overwritten in module 
>> Compat at /Users/vish/.julia/v0.5/Compat/src/Compat.jl:1678.
>> WARNING: Method definition redirect_stderr(Function, Any) in module 
>> Compat at /Users/vish/.julia/v0.5/Compat/src/Compat.jl:1600 overwritten in 
>> module Compat at /Users/vish/.julia/v0.5/Compat/src/Compat.jl:1600.
>> WARNING: Method definition redirect_stdin(Function, Any) in module Compat 
>> at /Users/vish/.julia/v0.5/Compat/src/Compat.jl:1600 overwritten in module 
>> Compat at /Users/vish/.julia/v0.5/Compat/src/Compat.jl:1600.
>> WARNING: Method definition run(Function) in module BinDeps at 
>> /Users/vish/.julia/v0.5/BinDeps/src/BinDeps.jl:445 overwritten in module 
>> BinDeps at /Users/vish/.julia/v0.5/BinDeps/src/BinDeps.jl:445.
>> WARNING: Method definition macroexpand(Module, Any) in module MacroTools 
>> at /Users/vish/.julia/v0.5/MacroTools/src/utils.jl:60 overwritten in module 
>> MacroTools at /Users/vish/.julia/v0.5/MacroTools/src/utils.jl:60.
>>
>> signal (11): Segmentation fault: 11
>> while loading no file, in expression starting on line 0
>> julia_type_to_llvm at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./cgutils.cpp:318
>> mark_julia_const at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:641 
>> [inlined]
>> emit_expr at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:3140
>> emit_function at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:4691
>> jl_compile_linfo at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:809
>> emit_invoke at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:2684 
>> [inlined]
>> emit_expr at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:3162
>> emit_assignment at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:2977 
>> [inlined]
>> emit_expr at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:3185
>> emit_stmtpos at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:3064
>> emit_function at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:4727
>> jl_compile_linfo at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:809
>> emit_invoke at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:2684 
>> [inlined]
>> emit_expr at 
>> /Users/osx/buildbot/slave/package_osx10_9-x64/build/src/codegen.cpp:3162
>> emit_assignment at 
>> /Users/osx/buildbot/slave/pa

[julia-users] Julia crashes on using PyPlot after workspace() on Mac OSX Yosemite

2016-10-20 Thread Vishnu Raj
sers/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1310
jl_call_method_internal at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:184 
[inlined]
jl_apply_generic at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942
jl_apply at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia.h:1392 
[inlined]
jl_module_run_initializer at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:83
jl_init_restored_modules at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/dump.c:1994 
[inlined]
_jl_restore_incremental at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/dump.c:2560
jl_restore_incremental at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/dump.c:2580
_include_from_serialized at ./loading.jl:150
_require_from_serialized at ./loading.jl:187
_require_search_from_serialized at ./loading.jl:217
jlcall__require_search_from_serialized_39488 at 
/Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib 
(unknown line)
jl_call_method_internal at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 
[inlined]
jl_apply_generic at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942
require at ./loading.jl:371
jlcall_require_22337 at 
/Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib 
(unknown line)
jl_call_method_internal at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 
[inlined]
jl_apply_generic at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942
jl_apply at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia.h:1392 
[inlined]
read_verify_mod_list at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/dump.c:1843
_jl_restore_incremental at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/dump.c:2514
jl_restore_incremental at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/dump.c:2580
_include_from_serialized at ./loading.jl:150
_require_from_serialized at ./loading.jl:187
_require_search_from_serialized at ./loading.jl:217
jlcall__require_search_from_serialized_39488 at 
/Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib 
(unknown line)
jl_call_method_internal at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 
[inlined]
jl_apply_generic at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942
require at ./loading.jl:371
jlcall_require_22337 at 
/Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib 
(unknown line)
jl_call_method_internal at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 
[inlined]
jl_apply_generic at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942
jl_apply at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia.h:1392 
[inlined]
eval_import_path_ at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:402
eval_import_path at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:429 
[inlined]
jl_toplevel_eval_flex at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/toplevel.c:480
jl_toplevel_eval_in_warn at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/builtins.c:590
eval at ./boot.jl:234
jlcall_eval_19752 at 
/Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib 
(unknown line)
jl_call_method_internal at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 
[inlined]
jl_apply_generic at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942
eval_user_input at ./REPL.jl:64
unknown function (ip: 0x318d551f6)
jl_call_method_internal at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 
[inlined]
jl_apply_generic at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942
macro expansion at ./REPL.jl:95 [inlined]
#3 at ./event.jl:68
unknown function (ip: 0x318d520df)
jl_call_method_internal at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia_internal.h:189 
[inlined]
jl_apply_generic at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/gf.c:1942
jl_apply at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/./julia.h:1392 
[inlined]
start_task at 
/Users/osx/buildbot/slave/package_osx10_9-x64/build/src/task.c:253
Allocations: 545 (Pool: 5398881; Big: 1124); GC: 7
*Segmentation fault: 11*

Can anybody please explain what is happening?

Thanks,
Vishnu Raj


[julia-users] Re: Announcing TensorFlow.jl, an interface to Google's TensorFlow machine learning library

2016-09-01 Thread Vishnu Raj
Thanks Jon, I was planning to start learning Tensorflow - now I can do it 
in julia :)

On Thursday, September 1, 2016 at 4:01:58 AM UTC+5:30, Jonathan Malmaud 
wrote:
>
> Hello,
> I'm pleased to announce the release of TensorFlow.jl, enabling modern 
> GPU-accelerated deep learning for Julia. Simply run Pkg.add("TensorFlow") 
> to install and then read through the documentation at 
> https://malmaud.github.io/tfdocs/index.html to get started. Please file 
> any issues you encounter at https://github.com/malmaud/TensorFlow.jl. 
>
> TensorFlow.jl offers a convenient Julian interface to Google's TensorFlow 
> library. It includes functionality for building up a computation graph that 
> encodes a deep-learning model and automatically minimizing an arbitrary 
> loss function with respect to the model parameters. Support is included for 
> convolutional networks, recurrent networks with LSTMs, the Adam 
> optimization algorithm, loading images, and checkpointing model parameters 
> to disk during training
>
> I'm hopeful that this package will ensure Julia remain a first-class 
> citizen in world of modern machine learning and look forward to the 
> community's help in getting it to match or exceed the capabilities of the 
> official Python TensorFlow API. 
>
> -Jon
>


[julia-users] Re: for loop with multiple variables

2016-05-10 Thread Vishnu Raj
Thanks :)

On Tuesday, May 10, 2016 at 4:44:18 PM UTC+5:30, Lutfullah Tomak wrote:
>
> for (i,j)=zip(0:5,6:10)
> println(i+j)
> end
> On Tuesday, May 10, 2016 at 2:02:41 PM UTC+3, Vishnu Raj wrote:
>>
>> What  if the equivalent of the C code below
>> for( i=0, j=6; i<=5, j <=10; i++, j++ ) print( "%d", i+j );
>> in julia?
>>
>

[julia-users] for loop with multiple variables

2016-05-10 Thread Vishnu Raj
What  if the equivalent of the C code below
for( i=0, j=6; i<=5, j <=10; i++, j++ ) print( "%d", i+j );
in julia?


Re: [julia-users] Re: Concurrently install two versions of Julia

2016-03-07 Thread Vishnu Raj
Yes. In the User Behavior I can change the julia path to use any version, 
but what's happening is when I put 0.4.3 to juno, it thows so many 
depreciation warnings and that's kind of annoying.
 

On Monday, March 7, 2016 at 8:57:53 PM UTC+5:30, Mike Innes wrote:
>
> You don't have to use Juno with the bundled copy of Julia, you can point 
> it to the external (0.4.3) version and use the same for both. Just poke 
> around in the settings and you should find the option.
> On Mon, 7 Mar 2016 at 04:44 Vishnu Raj  > wrote:
>
>> In my system I have Juno with 0.4.2 and julia with 0.4.3. Every time I 
>> start one, all my packages are getting recompiled. They are all under same 
>> v0.4 folder and I think that's why this is happening.
>> Is there a way to avoid this?
>>
>>
>> On Sunday, March 6, 2016 at 3:28:40 PM UTC+5:30, Andreas Lobinger wrote:
>>>
>>> Depends on your definition of installed and what system you use. I use 
>>> since 0.2 (and the 0.3dev) a local build -on a linux system- and this quite 
>>> nicely encapsulated in a single directory inside my home so they live in 
>>> parallel. The package directory which is inside .julia is has versioning 
>>> (v0.3/v0.4/v0.5), too.
>>>
>>> On Saturday, March 5, 2016 at 11:48:37 PM UTC+1, Pulkit Agarwal wrote:
>>>>
>>>> Hi,
>>>>
>>>> Is there a way to have the stable version of Julia as the global Julia 
>>>> (i.e. something which can be accessed by calling `julia` from the command 
>>>> line) and the development version of Julia (which will be stored in some 
>>>> other folder).
>>>>
>>>> Thanks,
>>>> Pulkit
>>>>
>>>

[julia-users] Re: Concurrently install two versions of Julia

2016-03-06 Thread Vishnu Raj
In my system I have Juno with 0.4.2 and julia with 0.4.3. Every time I 
start one, all my packages are getting recompiled. They are all under same 
v0.4 folder and I think that's why this is happening.
Is there a way to avoid this?

On Sunday, March 6, 2016 at 3:28:40 PM UTC+5:30, Andreas Lobinger wrote:
>
> Depends on your definition of installed and what system you use. I use 
> since 0.2 (and the 0.3dev) a local build -on a linux system- and this quite 
> nicely encapsulated in a single directory inside my home so they live in 
> parallel. The package directory which is inside .julia is has versioning 
> (v0.3/v0.4/v0.5), too.
>
> On Saturday, March 5, 2016 at 11:48:37 PM UTC+1, Pulkit Agarwal wrote:
>>
>> Hi,
>>
>> Is there a way to have the stable version of Julia as the global Julia 
>> (i.e. something which can be accessed by calling `julia` from the command 
>> line) and the development version of Julia (which will be stored in some 
>> other folder).
>>
>> Thanks,
>> Pulkit
>>
>

[julia-users] Adding a mtrix to the third dimension of a multi-dimensional array

2016-02-13 Thread Vishnu Raj
Hi,

I have a three dimensional array (say 'z' ) like this :

julia> z
4x3x3 Array{Int64,3}:
[:, :, 1] =
 1  5   9
 2  6  10
 3  7  11
 4  8  12

[:, :, 2] =
 13  17  21
 14  18  22
 15  19  23
 16  20  24

[:, :, 3] =
 25  29  33
 26  30  34
 27  31  35
 28  32  36

Now I have a matrix 'z1' as
julia> z1
4x3 Array{Int64,2}:
 37  41  45
 38  42  46
 39  43  47
 40  44  48

I want to put z1 at the end of third dimension of 'z'. So that the output 
will be like
julia> z[*:,:,4*]
4x3 Array{Int64,2}:
 37  41  45
 38  42  46
 39  43  47
 40  44  48

I tried push!() and append!(), both gives me errors.

Kindly suggest a way to do this. I want 'z' to grow in third dimension as 
simulation progresses.


Re: [julia-users] julia -machinefile help

2016-02-05 Thread Vishnu Raj
Sorry for the ambiguity. 
What I want to know is about the contents of machinefile, how to configure 
remote systems for accepting the connections.
Like a step by step procedure for bringing up a network of computers and 
deploying distributed code in the.


On Friday, February 5, 2016 at 8:43:20 PM UTC+5:30, Stefan Karpinski wrote:
>
> I didn't notice the subject, which indicates that you're having some 
> trouble with machine files, rather than wanting to know about distributed 
> computing in general. Can you be more specific about what the problem is?
>
> On Fri, Feb 5, 2016 at 10:07 AM, Stefan Karpinski  > wrote:
>
>> http://docs.julialang.org/en/latest/manual/parallel-computing/
>>
>> On Fri, Feb 5, 2016 at 10:02 AM, Vishnu Raj > > wrote:
>>
>>> Hi,
>>>
>>> Can some provide any pointers on how to configure julia to run 
>>> distributed code?
>>> I want to configure three macs to run my distributed code.
>>>
>>
>>
>

[julia-users] julia -machinefile help

2016-02-05 Thread Vishnu Raj
Hi,

Can some provide any pointers on how to configure julia to run distributed 
code?
I want to configure three macs to run my distributed code.


[julia-users] Re: Using DataFrames

2015-12-10 Thread Vishnu Raj
Hi,

Thanks :) That helped.
On Wednesday, December 9, 2015 at 6:43:30 PM UTC+5:30, Andre Bieler wrote:
>
> Hi Vish,
>
> there are two things I can spot.
>
> 1) You actually do have a header in the .csv file, so header=false is not 
> a good option.
>
> 2) Something probably has gone wrong with the formatting of the second 
> line in your .csv file.
> It contains stuff like: *.1.739873170852661133e.00* which cannot be 
> interpreted as a number
> (note the dot in front of 1)
>
> if I remove the second line of your .csv file I can read it in with
>
> df = readtable("sample.csv")
>
> So you might check the script producing your .csv file to get a nicely 
> formatted
> first line of the data.
>
> Hope this helps.
> Andre
>
>
>
>
> On Tuesday, December 8, 2015 at 11:27:34 PM UTC-5, Vishnu Raj wrote:
>>
>> This is my sample CSV. It is an extract from UCI SUSY dataset, only first 
>> few were saved using an R script.
>>
>>
>> On Wednesday, December 9, 2015 at 3:26:19 AM UTC+5:30, Andre Bieler wrote:
>>>
>>> I cannot reproduce this.
>>> Can you provide your data file?
>>>
>>> I attached a .cvs file and a .jl file to 
>>> read out the data. Seems all good to me
>>> and the values are stored as Float64.
>>>
>>>
>>>
>>>
>>>
>>> On Tuesday, December 8, 2015 at 7:24:26 AM UTC-5, Vishnu Raj wrote:
>>>>
>>>> Hi,
>>>> I have a CSV file with values represented as 2.345 and 1.23e2 (say) and 
>>>> no header
>>>> When I try readtable( "file", header=false ), I'm getting all the cell 
>>>> values as "UTF8String". How can I properly read it as Float64??
>>>>
>>>> - vish
>>>>
>>>

[julia-users] Re: Using DataFrames

2015-12-08 Thread Vishnu Raj
This is my sample CSV. It is an extract from UCI SUSY dataset, only first 
few were saved using an R script.


On Wednesday, December 9, 2015 at 3:26:19 AM UTC+5:30, Andre Bieler wrote:
>
> I cannot reproduce this.
> Can you provide your data file?
>
> I attached a .cvs file and a .jl file to 
> read out the data. Seems all good to me
> and the values are stored as Float64.
>
>
>
>
>
> On Tuesday, December 8, 2015 at 7:24:26 AM UTC-5, Vishnu Raj wrote:
>>
>> Hi,
>> I have a CSV file with values represented as 2.345 and 1.23e2 (say) and 
>> no header
>> When I try readtable( "file", header=false ), I'm getting all the cell 
>> values as "UTF8String". How can I properly read it as Float64??
>>
>> - vish
>>
>"labels","lepton 1 pT","lepton 1 eta","lepton 1 phi","lepton 2 pT","lepton 2 eta","lepton 2 phi","missing energy magnitude","missing energy phi","MET_rel","axial MET","M_R","M_TR_2","R","MT2","S_R","M_Delta_R","dPhi_r_b","cos(theta_r1)"
0,9.728614687919616699e.01,6.538545489311218262e.01,1.176224589347839355e.00,1.157156467437744141e.00,.1.739873170852661133e.00,.8.743090629577636719e.01,5.677649974822998047e.01,.1.75417232513428e.01,8.100607395172119141e.01,.2.525521218776702881e.01,1.921887040138244629e.00,8.896374106407165527e.01,4.107718467712402344e.01,1.145620822906494141e.00,1.932632088661193848e.00,9.944640994071960449e.01,1.367815494537353516e.00,4.071449860930442810e.02
0,1.86504542827606,-0.256076544523239,1.21556389331818,1.12735903263092,1.59875667095184,-0.421102404594421,0.59562224149704,-1.28983151912689,0.847075223922729,0.162857249379158,2.08215761184692,1.03591108322144,0.4414943754673,0.822985291481018,2.03021240234375,1.12381184101105,0.503678143024445,0.105927996337414
1,1.23669397830963,-1.0564945936203,1.06098961830139,1.69133532047272,-0.1053371950984,-0.633382022380829,0.497801452875137,0.840823829174042,0.297966241836548,0.813646852970123,1.36200261116028,0.793418228626251,0.516939520835876,0,1.36335909366608,0.181166917085648,1.53079199790955,0.0442323982715607
1,2.32381153106689,0.317979544401169,-0.716382801532745,0.560029029846191,1.72120821475983,1.28127014636993,1.27762341499329,0.85041618347168,1.13450503349304,-0.930379033088684,1.64815187454224,1.93562304973602,1.04217255115509,1.08652937412262,1.54960966110229,1.74726450443268,0.296678125858307,0.499137997627258
0,0.688603639602661,0.286295622587204,-0.415569216012955,0.906572997570038,-0.395993709564209,1.47816252708435,0.303133547306061,1.63432312011719,0.122213765978813,0.230870336294174,0.696205914020538,0.497935771942139,0.634675800800323,0,0.698711693286896,0.160106301307678,0.991877377033234,0.158656999468803
1,1.42594838142395,1.88176500797272,0.597493171691895,1.26869165897369,1.931725025177,-1.54698240756989,1.02646565437317,-0.757853448390961,1.52267813682556,-0.704253792762756,1.1417064666748,1.43718016147614,1.11705219745636,1.98129916191101,1.16214549541473,1.4821389913559,1.16295492649078,0.322542011737823
1,4.48375272750854,1.17115998268127,0.350268751382828,3.17667937278748,0.683380365371704,-1.49058628082275,2.36226868629456,-1.07206094264984,2.40570306777954,-1.85488831996918,3.44455337524414,3.6280779838562,0.934669852256775,2.14494132995605,3.44335794448853,2.06024789810181,0.786961138248444,0.357472985982895
0,1.432950258255,0.245450794696808,1.41979825496674,1.87674164772034,0.512243330478668,-0.188924312591553,0.233110710978508,-1.00570917129517,0.348837673664093,0.127952411770821,1.35067427158356,0.653409540653229,0.429291725158691,0.63501912355423,1.34790122509003,0.476063072681427,0.431901723146439,0.0716297030448914
1,0.467593640089035,-0.956501662731171,-0.328008234500885,0.675719380378723,-0.462600588798523,0.937212467193604,1.03428637981415,-0.844957292079926,1.26218342781067,-0.0472075901925564,0.473422288894653,0.807690262794495,1.51395046710968,1.13359785079956,0.54059636592865,0.89522397518158,1.26902544498444,0.372736006975174


[julia-users] Using DataFrames

2015-12-08 Thread Vishnu Raj
Hi,
I have a CSV file with values represented as 2.345 and 1.23e2 (say) and no 
header
When I try readtable( "file", header=false ), I'm getting all the cell 
values as "UTF8String". How can I properly read it as Float64??

- vish


[julia-users] Re: Error while Building PyCall

2015-11-24 Thread Vishnu Raj
Thank you both :)
Relaunching and building worked!! :)


[julia-users] Error while Building PyCall

2015-11-23 Thread Vishnu Raj
Hi,

I'm using Julia 0.4.0 in OSX 10.10. Today when I tried to upgrade my 
packages I got this error
julia> Pkg.build( "PyCall" )
INFO: Building PyCall
INFO: Recompiling stale cache file /Users/vish/.julia/lib/v0.4/Conda.ji for 
module Conda.
WARNING: Module SHA uuid did not match cache file
WARNING: deserialization checks failed while attempting to load cache from 
/Users/vish/.julia/lib/v0.4/Conda.ji
INFO: Precompiling module Conda...
INFO: Recompiling stale cache file /Users/vish/.julia/lib/v0.4/Conda.ji for 
module Conda.
WARNING: Module JSON uuid did not match cache file
==[
 
ERROR: PyCall 
]==

LoadError: __precompile__(true) but require failed to create a precompiled 
cache file
while loading /Users/vish/.julia/v0.4/PyCall/deps/build.jl, in expression 
starting on line 12

=

==[
 
BUILD ERRORS 
]===

WARNING: PyCall had build errors.

 - packages with build errors remain installed in /Users/vish/.julia/v0.4
 - build the package(s) and all dependencies with `Pkg.build("PyCall")`
 - build a single package by running its `deps/build.jl` script

=
 Version Info gives
julia> versioninfo()
Julia Version 0.4.0
Commit 0ff703b* (2015-10-08 06:20 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i5-4570R CPU @ 2.70GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3


Any thoughts on what's happening and how to build this?


[julia-users] Trees in Julia

2015-11-19 Thread Vishnu Raj
Hi,

I want to create a tree of nodes where each node will have only one parent 
and arbitrary number of children. Also each branch can go to arbitrary 
depth. Now, if I want to define julia type for such a node, how it should 
be like?
In C++, I can use

struct trieNode {
// hold data
unsigned id;
float value;

// to hold number of children of this node
unsigned noOfChildren;
// link to first child of this node, NULL is no child
trieNode *firstChild;
// pointer to next sibling(NULL if this is last child). Parent can access 
other children through their first child only
trieNode *nextSibling;

};

What is the equivalent of above in Julia?

Is there a better/alternate way to solve this problem in Julia?

Thanks ahead,
vish


[julia-users] [Gadfly] : Help regarding plotting

2015-10-27 Thread Vishnu Raj
Hello,

I have a couple of doubts about using Gadfly for plotting
1. How to set a line style ( like "--"/"-.-" etc)?
2. How to put a legend in a figure, inside the figure? ( I came across a 
solution which first converts data to plot to DataFrames, but this puts 
legend outside the figure, effectively reducing my actual plot area )

- vish


[julia-users] Re: Julia on Mac OS X Yosemite

2015-10-18 Thread Vishnu Raj
Solution at this link worked for me : 
https://github.com/one-more-minute/Julia-LT/issues/203


[julia-users] Performance compared to Matlab

2015-10-18 Thread Vishnu Raj
Although Julia homepage shows using Julia over Matlab gains more in 
performance, my experience is quite opposite.
I was trying to simulate channel evolution using Jakes Model for wireless 
communication system.

Matlab code is:
function [ h, tf ] = Jakes_Flat( fd, Ts, Ns, t0, E0, phi_N )
%JAKES_FLAT 
%   Inputs:
%   fd, Ts, Ns  : Doppler frequency, sampling time, number of samples
%   t0, E0  : initial time, channel power
%   phi_N   : initial phase of the maximum Doppler frequeny
%   sinusoid
%
%   Outputs:
%   h, tf   : complex fading vector, current time

if nargin < 6,  phi_N = 0;  end
if nargin < 5,  E0 = 1; end
if nargin < 4,  t0 = 0; end

N0 = 8; % As suggested by Jakes
N  = 4*N0 + 2;  % an accurate approximation
wd = 2*pi*fd;   % Maximum Doppler frequency[rad]
t  = t0 + [0:Ns-1]*Ts;  % Time vector
tf = t(end) + Ts;   % Final time
coswt = [ sqrt(2)*cos(wd*t); 2*cos(wd*cos(2*pi/N*[1:N0]')*t) ];
h  = E0/sqrt(2*N0+1)*exp(j*[phi_N pi/(N0+1)*[1:N0]])*coswt;
end
Enter code here...

My call results in :
>> tic; Jakes_Flat( 926, 1E-6, 5, 0, 1, 0 ); toc
Elapsed time is 0.008357 seconds.


My corresponding Julia code is
function Jakes_Flat( fd, Ts, Ns, t0 = 0, E0 = 1, phi_N = 0 )
# Inputs:
#
# Outputs:
  N0  = 8;  # As suggested by Jakes
  N   = 4*N0+2; # An accurate approximation
  wd  = 2*pi*fd;# Maximum Doppler frequency
  t   = t0 + [0:Ns-1]*Ts;
  tf  = t[end] + Ts;
  coswt = [ sqrt(2)*cos(wd*t'); 2*cos(wd*cos(2*pi/N*[1:N0])*t') ]
  h = E0/sqrt(2*N0+1)*exp(im*[ phi_N pi/(N0+1)*[1:N0]']) * coswt
  return h, tf;
end
# Saved this as "jakes_model.jl"


My first call results in 
julia> include( "jakes_model.jl" )
Jakes_Flat (generic function with 4 methods)

julia> @time Jakes_Flat( 926, 1e-6, 5, 0, 1, 0 )
elapsed time: 0.65922234 seconds (61018916 bytes allocated)

julia> @time Jakes_Flat( 926, 1e-6, 5, 0, 1, 0 )
elapsed time: 0.042468906 seconds (17204712 bytes allocated, 63.06% gc time)

For first execution, Julia is taking huge amount of time. On second call, 
even though Julia take considerably less(0.042468906 sec) than first(
0.65922234 sec), it's still much higher to Matlab(0.008357 sec).
I'm using Matlab R2014b and Julia v0.3.10 on Mac OSX10.10.

- vish