[julia-users] Function to get Index of nonzero entries in sparse vector

2014-10-10 Thread JVaz
Hello, I have a sparse vector, is there any function that returns an array with the index of its nonzero entires? E.g I have A 1048576x1 sparse matrix with 2 Float64 entries: [1 , 1] = 0.5 [32801 , 1] = 0.5 I want a function(A) -- [1,32801] Thanks!

[julia-users] Developping and debugging a module

2014-10-10 Thread Ján Dolinský
Hello, I am developing a module. I load it using using module. Then I call a function from the module to test it out. If I get an error I fix it in module.jl but Julia is still using the older unfixed version of the module. Running using module again does not help so I have to quit Julia and

[julia-users] Developping and debugging a module

2014-10-10 Thread Toivo Henningsson
If you include() the source file for the module, it will be replaced. Then you just have to make sure that you don't have any references to stuff in the old module that stick around. If you always reference things in the module via dot notation you should be fine. Another way, which I usually

[julia-users] Re: Developping and debugging a module

2014-10-10 Thread Ján Dolinský
There seems to an answer in the Julia FAQ but nevertheless any tips are welcome. Thanks, Jan Dňa piatok, 10. októbra 2014 11:04:34 UTC+2 Ján Dolinský napísal(-a): Hello, I am developing a module. I load it using using module. Then I call a function from the module to test it out. If I get

[julia-users] Re: Developping and debugging a module

2014-10-10 Thread Ján Dolinský
Hello Toivo, Thanks for the tip. This is also the recommended way I found later in FAQ. Thanks a lot. Jan Dňa piatok, 10. októbra 2014 11:27:14 UTC+2 Toivo Henningsson napísal(-a): If you include() the source file for the module, it will be replaced. Then you just have to make sure that

[julia-users] Re: Installing Julia Studio properly on Windows 7 - Step by Step Instructions

2014-10-10 Thread pamjervis
Thanks Iain. So then how could I fix it? On Wednesday, November 27, 2013 8:17:32 AM UTC, Dominik Holenstein wrote: I needed several attempts until I could start working with Julia Studio on Windows 7. Most of the issues I faced were related to the package management and that Julia

Re: [julia-users] How to define rounding macros depending on type

2014-10-10 Thread Simon Byrne
On Friday, 10 October 2014 04:12:37 UTC+1, David P. Sanders wrote: I believe (but please correct me if I'm wrong) that I do need a macro, since I use it with whole expressions to ensure the correct rounding, for example (simplifying) something like @round_down( min(a*b, c*d) ) You can

Re: [julia-users] Function to get Index of nonzero entries in sparse vector

2014-10-10 Thread Pontus Stenetorp
On 10 October 2014 17:07, JVaz joanvazquezmol...@gmail.com wrote: I have a sparse vector, is there any function that returns an array with the index of its nonzero entires? E.g I have A 1048576x1 sparse matrix with 2 Float64 entries: [1 , 1] = 0.5 [32801 , 1] = 0.5

[julia-users] Re: Function to get Index of nonzero entries in sparse vector

2014-10-10 Thread JVaz
Thanks Pontus! El viernes, 10 de octubre de 2014 17:07:25 UTC+9, JVaz escribió: Hello, I have a sparse vector, is there any function that returns an array with the index of its nonzero entires? E.g I have A 1048576x1 sparse matrix with 2 Float64 entries: [1 , 1] =

[julia-users] Re: Loading data just once

2014-10-10 Thread Gunnar Farnebäck
I wrote this when I wanted to cache the results of matread. Your problem sounds like it could be similar. let matread_cache = (String = Any)[] global caching_matread function caching_matread(filename) if !haskey(matread_cache, filename) matread_cache[filename] =

Re: [julia-users] Re: Loading data just once

2014-10-10 Thread Peter Boardman
On 10 Oct 2014, at 12:46, Gunnar Farnebäck gun...@lysator.liu.se wrote: I wrote this when I wanted to cache the results of matread. Your problem sounds like it could be similar. let matread_cache = (String = Any)[] global caching_matread function caching_matread(filename)

Re: [julia-users] DataFrame groupby error

2014-10-10 Thread Tom Short
Frederico, the best way to solve this is to provide a reproducible example. If you file a bug report at the following with an example, there'll be less of a chance that this gets lost: https://github.com/JuliaStats/DataFrames.jl/issues/ On Wed, Oct 8, 2014 at 3:32 PM, Frederico Novaes

Re: [julia-users] How to define rounding macros depending on type

2014-10-10 Thread David P. Sanders
El viernes, 10 de octubre de 2014 05:15:48 UTC-5, Simon Byrne escribió: On Friday, 10 October 2014 04:12:37 UTC+1, David P. Sanders wrote: I believe (but please correct me if I'm wrong) that I do need a macro, since I use it with whole expressions to ensure the correct rounding, for

Re: [julia-users] How to define rounding macros depending on type

2014-10-10 Thread Simon Byrne
Ah, I see. I don't have any good suggestions I'm afraid (other than change both rounding modes), but you can simplify your macro slightly: macro new_round_down(expr, T) quote with_rounding($T, RoundDown) do $expr end end end As someone who

Re: [julia-users] How to define rounding macros depending on type

2014-10-10 Thread David P. Sanders
El viernes, 10 de octubre de 2014 08:16:26 UTC-5, Simon Byrne escribió: Ah, I see. I don't have any good suggestions I'm afraid (other than change both rounding modes), Actually my current branch does change both rounding modes ;) I guess the correct way to do this would be to nest

Re: [julia-users] How to define rounding macros depending on type

2014-10-10 Thread Simon Byrne
On 10 October 2014 14:21, David P. Sanders dpsand...@gmail.com wrote: Actually my current branch does change both rounding modes ;) I guess the correct way to do this would be to nest `with_rounding(Float64, RoundDown)` inside `with_rounding(BigFloat, RoundDown)`? That should work. [By

[julia-users] Re: Structure and Interpretation of Classical Mechanics

2014-10-10 Thread Amuthan A. Ramabathiran
Any updates on this? Amuthan On Tuesday, January 14, 2014 3:31:16 PM UTC-8, Brian Cohen wrote: Most code examples for Julia are aimed at users of existing statistical and numerical software without demonstrating how functional programming can be substantially more useful for their field.

Re: [julia-users] Re: Function roots() in package Polynomial

2014-10-10 Thread Alan Edelman
Related topic: I'd like to propose that roots and polyval be part of base. I can promise firsthand that they are among the first things a 12 year old user of Julia would just want to be there. On Tuesday, June 17, 2014 11:30:04 AM UTC-4, Stefan Karpinski wrote: On Tue, Jun 17, 2014 at

Re: [julia-users] Re: Structure and Interpretation of Classical Mechanics

2014-10-10 Thread Erik Schnetter
I'm not quite certain about Scheme syntax. So L-free-particle is a function accepting one argument mass that returns another function accepting an argument local? And you are renaming local to tuple? (I would have gone with loc.) What do you mean by constructor for symbolic manipulation? Julia

Re: [julia-users] Re: ANN: GeometricalPredicates.jl

2014-10-10 Thread Ariel Keselman
just opened the PR for METADATA.jl

Re: [julia-users] Re: Function roots() in package Polynomial

2014-10-10 Thread Tony Kelman
Polynomials is a good candidate for “default packages” however that ends up being implemented. Installed by default for the vast majority of users who aren’t trying to do something with a “minimal Julia,” but not strictly necessary for the rest of the language to function. From: Alan Edelman

[julia-users] Multi-OS (Linux + Mac) testing in Travis

2014-10-10 Thread Tony Kelman
Heads up for package developers - looks like Travis got some additional capacity and is accepting new repositories for multi-OS support. See http://docs.travis-ci.com/user/multi-os/ - you need to send an email to supp...@travis-ci.com asking them to enable multi-OS support for your package,

[julia-users] Re: JUNO: Couldn't Connect to Julia

2014-10-10 Thread Mike Innes
Hi Thomas, I've decided to wait until 0.4 has settled down a bit before supporting it in Juno, so it's best to grab the latest release of Julia (v0.3). Building from git should work fine but you could also try using the Ubuntu packages

Re: [julia-users] Behaviour of expanduser is inconsistent between platforms.

2014-10-10 Thread Sean Marshallsay
Hmmm... looking at how bash handles this it doesn't seem too difficult, I might give it a go over the weekend. I have no idea how to handle it on Windows though. On Thursday, 9 October 2014 18:06:07 UTC+1, Stefan Karpinski wrote: This is definitely a bug. The implementation on both platforms

Re: [julia-users] Behaviour of expanduser is inconsistent between platforms.

2014-10-10 Thread Stefan Karpinski
How does bash handle it? On Fri, Oct 10, 2014 at 3:22 PM, Sean Marshallsay srm.1...@gmail.com wrote: Hmmm... looking at how bash handles this it doesn't seem too difficult, I might give it a go over the weekend. I have no idea how to handle it on Windows though. On Thursday, 9 October 2014

[julia-users] more implementations of convert()

2014-10-10 Thread David van Leeuwen
Hi, I seem to need convert() a lot, and especially for arrays this is somewhat of a nuisance. E.g., convert(Float32, rand(2,3)) does not work out of the box. Luckily, for the numeric types there are the functions float64(), float32() etc that can operate on arrays. This is all good, but

Re: [julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-10-10 Thread Helios De Rosario
It is 0.3.1~trusty2. The crash message in the terminal only says core generated (in Spanish). I suppose it means that there is a dump file somewhere with the details, but I cannot find it. If somebody knows where should I look for it, I would be happy to post those details. Thanks Helios On

Re: [julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-10-10 Thread Elliot Saba
What kind of computer do you have? Is it a 32-bit machine or 64-bit? Can you try running julia inside of gdb and giving any information on what gdb says such as a backtrace showing where it crashed? To run julia inside of gdb, just run gdb julia, then when gdb is loaded press r to run julia,

Re: [julia-users] more implementations of convert()

2014-10-10 Thread Tim Holy
I think the problem is in deciding when do I use the equivalent of map? and when do I convert as a whole object? For example, if I say convert(Image, A) I'm not asking to convert each _element_ of A to an Image, I'm asking to convert _A as a whole_ to an Image. But now let's say I had an

[julia-users] QZ Decomposition Reordering

2014-10-10 Thread Ricardo Mayer
Can the schurfact(A,B) function reorder its output such that generalized eigenvalues appear in descending (or ascending) magnitude order? I'm thinking on something like MATLAB's ordqz or R's ordqz (in QZ package). I'm really new to Julia (installed it just a few minutes ago, actually), but as

[julia-users] Advise on Julia composite type to replace MATLAB struct

2014-10-10 Thread mfjonker
Dear Julia users, For a computationally challenging problem I'm trying to port an existing design-optimization from MATLAB to Julia. Currently, the designs are organized in a MATLAB struct and I am looking for some advice on how to efficiently store and distribute the data for a parallel

Re: [julia-users] ANN: GeometricalPredicates.jl

2014-10-10 Thread Chris Foster
This is pretty cool. Writing a robust set of geometric predicates requires quite an attention to detail. Some questions: Restricting to the float range 1.0=x2.0 essentially makes the input a fixed point representation, with fixed point scaling factor eps(1.0) = 2.220446049250313e-16. How does

[julia-users] About usage in Emacs (not display prompt of Julia)

2014-10-10 Thread kenichi sasagawa
Hello I like Julia very much. I switched from Scheme. By the way, please tell me usage in Emacs(on WIndows7). I'm in trouble that prompt is not displayed in the Shell. I'm guessing Julia display prompt without STDIO. Yours sincerely example of running in shell Copyright (c) 2009 Microsoft

Re: [julia-users] iterating through permutations in parallel

2014-10-10 Thread Jason Solack
thank you, this is very helpful. On Wednesday, October 8, 2014 9:18:14 AM UTC-4, David Gonzales wrote: here is more source code sample for parallel permutation processing. this code goes over all permutation of `keys` and counts the number of cycles into `resall`:

[julia-users] Re: About usage in Emacs (not display prompt)

2014-10-10 Thread Patrick O'Leary
There is not currently a solution to this problem. There is an issue tracking it: https://github.com/JuliaLang/julia/issues/5271 On Friday, October 10, 2014 8:52:00 PM UTC-5, kenichi sasagawa wrote: Hello I like Julia very much. I switched from Scheme. By the way, please tell me usage in

[julia-users] This week in Julia

2014-10-10 Thread Matt Bauman
This is an experiment. I think it'd be really amazing to have weekly updates about what's going on in Julia master, particularly during this crazy 0.4-dev period. So I figured I'd give it a shot. Take a look: http://thisweekinjulia.github.io/julia/2014/10/10/October-10.html I first tried a

Re: [julia-users] This week in Julia

2014-10-10 Thread Elliot Saba
This is great. Honestly, I can't believe that some of these things were only 2 weeks ago. It feels so much longer. ;) -E On Fri, Oct 10, 2014 at 7:30 PM, Matt Bauman mbau...@gmail.com wrote: This is an experiment. I think it'd be really amazing to have weekly updates about what's going on

[julia-users] Code slower if not enclosed in a function?

2014-10-10 Thread David Smith
This code runs in 0.5 sec in v0.3.2, but takes 0.64 s in v0.4: tic() N = 256 n = 80 x = rand(N,N) + 1im*randn(N,N) f = zeros(Complex128, N, N, n) for t = 1:n f[:,:,t] = fft(x + float(t)) end toc() If I enclose it in a function, as in the following, and then run it by calling the

[julia-users] Re: Advise on Julia composite type to replace MATLAB struct

2014-10-10 Thread Viral Shah
A composite type is the right data structure, given that you have large arrays you need to store in your type. -viral On Saturday, October 11, 2014 4:43:50 AM UTC+5:30, mfjo...@hotmail.com wrote: Dear Julia users, For a computationally challenging problem I'm trying to port an existing

[julia-users] Re: Code slower if not enclosed in a function?

2014-10-10 Thread Patrick O'Leary
http://julia.readthedocs.org/en/release-0.3/manual/performance-tips/#avoid-global-variables On Friday, October 10, 2014 10:56:36 PM UTC-5, David Smith wrote: This code runs in 0.5 sec in v0.3.2, but takes 0.64 s in v0.4: tic() N = 256 n = 80 x = rand(N,N) + 1im*randn(N,N) f =

[julia-users] Re: This week in Julia

2014-10-10 Thread Viral Shah
Really nice to have. Perhaps publish as a blog and post on juliabloggers.com? -viral On Saturday, October 11, 2014 8:00:11 AM UTC+5:30, Matt Bauman wrote: This is an experiment. I think it'd be really amazing to have weekly updates about what's going on in Julia master, particularly during

[julia-users] Re: This week in Julia

2014-10-10 Thread Viral Shah
Is there an RSS feed already? -viral On Saturday, October 11, 2014 9:34:47 AM UTC+5:30, Viral Shah wrote: Really nice to have. Perhaps publish as a blog and post on juliabloggers.com? -viral On Saturday, October 11, 2014 8:00:11 AM UTC+5:30, Matt Bauman wrote: This is an experiment. I

[julia-users] Re: Multi-OS (Linux + Mac) testing in Travis

2014-10-10 Thread Viral Shah
Now, if only they had Windows! -viral On Friday, October 10, 2014 11:19:26 PM UTC+5:30, Tony Kelman wrote: Heads up for package developers - looks like Travis got some additional capacity and is accepting new repositories for multi-OS support. See http://docs.travis-ci.com/user/multi-os/ -

[julia-users] Re: About usage in Emacs (not display prompt)

2014-10-10 Thread kenichi sasagawa
Thank you On Saturday, October 11, 2014 11:27:29 AM UTC+9, Patrick O'Leary wrote: There is not currently a solution to this problem. There is an issue tracking it: https://github.com/JuliaLang/julia/issues/5271 On Friday, October 10, 2014 8:52:00 PM UTC-5, kenichi sasagawa wrote: Hello

[julia-users] Re: Multi-OS (Linux + Mac) testing in Travis

2014-10-10 Thread Jeff Waller
Wow, this is exactly what I need. As I just got Travis functional last night for the first time @ 3 (you should see the crazy binding.gyp file), I feel the universe is reaching out to me. Thanks, Tony, thanks, universe.

Re: [julia-users] Re: Structure and Interpretation of Classical Mechanics

2014-10-10 Thread Kevin Lin
PS I didn't know about JuliaDiff, but it looks like an interesting effort to do in Julia some of the same things that ScmUtils does in Scheme. See http://www.juliadiff.org/ haven't used any of the packages, but one may be able to port some of ScmUtils using this.