Re: [julia-users] Using -args to execute a function for different parameters

2016-10-29 Thread varun7rs
I don't understand what the post means. Could you please elaborate a bit? On Saturday, 29 October 2016 22:04:32 UTC+2, Yichao Yu wrote: > > > 3. This is the most confusing part for me. I really don't get the Julia > > equivalent of these two lines. if __name__ == "__main__": > >

Re: [julia-users] Using -args to execute a function for different parameters

2016-10-29 Thread varun7rs
There are a few doubts that I may want to clarify as of now. Thanks a lot for the link @Yichao, @Josef. 1. The function definition in python is def main(argv). I wrote function main(args) in the Julia equivalent. Is this the right way to do it? 2. For the line in Python args =

Re: [julia-users] Using -args to execute a function for different parameters

2016-10-27 Thread varun7rs
Hi Josef, I shall paste a function that I used for my python files. Would it be okay if I asked you for some help to do the same in Julia? I've implemented most of the code but this still remains to be done in Julia and I wasn't aware such a package exists. Thanks a lot def main(argv):

[julia-users] Using -args to execute a function for different parameters

2016-10-27 Thread varun7rs
Hello, I've been using Julia for a month probably and I would now like to execute a bash script containing a set of commands to run the same file for different arguments. The file myFile.jl contains calls to some functions to accomplish a task and this task needs to be rerun for different

[julia-users] How to save an object of a defined type

2016-10-22 Thread varun7rs
I have a module defined as module *Core* within which I have defined several types (*Node*, *Edge*, *Res*). Now what I intend to do is that I want to save the output of a function which is an object (*res1*) of type *Res* onto a JLD file so that I can retrieve it later on. I am calling the

[julia-users] Failed to precompile LightGraphs

2016-10-15 Thread varun7rs
I recently installed the LightGraphs package for my work but when I enter "using LightGraphs", I get an error saying failed to precompile LightGraphs to /home/user/.julia/lib/v0.5/LightGraphs.jl. Can you please tell me what the error is about and how to get LightGraphs working again?

Re: [julia-users] Must we reinstall all packages after updating to v0.5?

2016-10-08 Thread varun7rs
It worked. Thanks for your advice. Another thing, I observed the previous version v0.4 folder on the disk. Is there a way to delete it and free up some space? On Saturday, 8 October 2016 20:43:57 UTC+2, Yichao Yu wrote: > > On Sat, Oct 8, 2016 at 2:41 PM, Yichao Yu > wrote:

[julia-users] Must we reinstall all packages after updating to v0.5?

2016-10-08 Thread varun7rs
Hi, I'm not sure if anyone else has this problem but apparently, after updating to v0.5, I can no longer find the packages that I had previously installed in v0.4. The console says, argumenterror: Module Statsbase not found in current path. I tried Pkg.status in my pwd and it didn't show any

[julia-users] reading 4-level nested child nodes using lightxml

2016-09-21 Thread varun7rs
i have a rather long xml file which i need to parse and i'm not able to proceed at a certain point. the code throws up errors when i try to access the child nodes of a certain element.

[julia-users] Re: KeyError when trying to access a column of the dataframes iteratively

2016-09-18 Thread varun7rs
Sorry about that. I was able to fix the error by changing x = frame[:type] to x = frame[type] Apologies for the trouble caused On Sunday, 18 September 2016 22:45:27 UTC+2, varu...@gmail.com wrote: > > > Hi, > > I seem to have run into a problem here. I firstly have a function as > follows: > >

[julia-users] KeyError when trying to access a column of the dataframes iteratively

2016-09-18 Thread varun7rs
Hi, I seem to have run into a problem here. I firstly have a function as follows: function gen(type, frame1, frame2) x = frame1[:type] z = frame2[:type] y = [] for i in length(frame1) push!(y, x[i] * z[i]) end end Now, when I call: ans = gen(I, frame1, frame2), I get a

[julia-users] Re: Error when assigning values to an object

2016-09-16 Thread varun7rs
Thanks for answering all of my nooby questions. Julia is cool again! On Friday, 16 September 2016 14:20:53 UTC+2, randm...@gmail.com wrote: > > Sure, just export what you want available when using your Module -- > that's useful anyways for defining a public API. Also have a look at the > Julia

[julia-users] Re: Error when assigning values to an object

2016-09-16 Thread varun7rs
Oh, thanks so much! It fixed my problem. But, is there a way to just write PhyNode(blah, blah, blah) instead of the cumbersome MyClasses.PhyNode ? I tried using MyClasses and it reported the same error as well. On Friday, 16 September 2016 12:11:18 UTC+2, randm...@gmail.com wrote: > > The error

[julia-users] Re: Error when assigning values to an object

2016-09-16 Thread varun7rs
The files are indeed in the same directory and I also added the path of these files to the variable LOAD_PATH as well. But still, I get the same error. On Friday, 16 September 2016 09:49:45 UTC+2, Lutfullah Tomak wrote: > > It is related to the `importall` part of code. It can be that the files

[julia-users] Error when assigning values to an object

2016-09-16 Thread varun7rs
Hello, I have some trouble using types in Julia. Thanks to some earlier help, I was able to define type Physical Node and save it in a file MyClasses.jl module MyClasses using DataArrays type PhyNode{T} ID::Int64 name::AbstractString x::Float64 y::Float64 inEdges::Vector{T}

[julia-users] How should I define PhysicalNodes class in Julia differently than I did in Python

2016-08-27 Thread varun7rs
HI, Previously, I had posted a question asking for some clarification regarding the usage of types in Julia to suit the problem at hand. I had used Python's classes for the problem and I would like to know how I can define PhysicalNodes and PhysicalLinks classes in Julia differently than I did

[julia-users] Re: Syntax to create nested types in Julia

2016-08-27 Thread varun7rs
Thanks Jeffrey. So, should I close this post and ask a new question as you suggested? On Saturday, 27 August 2016 11:27:32 UTC+2, Jeffrey Sarnoff wrote: > > In an object-oriented language, an instance of a class is an element of > computation (1 is an instance of the class Integer, and Integer

[julia-users] Re: Syntax to create nested types in Julia

2016-08-27 Thread varun7rs
What are the alternatives to using classes in Julia apart from types? Can you please explain how I can define the PhysicalNodes class in Julia the same way like I did in python? On Friday, 26 August 2016 23:16:39 UTC+2, Cedric St-Jean wrote: > > It's not possible in Julia at the moment. There's

[julia-users] Syntax to create nested types in Julia

2016-08-26 Thread varun7rs
Hello all, I'm making a transition from Python to Julia and in the process, I've encountered a small difficulty. While in python, i declared three classes as follows: class PHY_NODES: def __init__(self, nodeID, nodenum, x, y, demands): self.id = nodeID self.nodenum =