[julia-users] Re: Iterating over non-zero entries of a sparse matrix

2016-11-09 Thread randmstring
Use findnz . Am Mittwoch, 9. November 2016 14:37:11 UTC+1 schrieb Christoph Ortner: > > Is there as iterator implemented that allows me to iterate over all > non-zero entries of a sparse matrix or vector? E.g. > > for (i, j, z) in

[julia-users] Re: problems (and some fixes) for using Plots and PlotlyJS on FreeBSD

2016-11-08 Thread randmstring
I don't think Electron works on FreeBSD (see here ), but Blink requires it. You could try using the Linux binaries by changing this line to be is_linux() ||

[julia-users] Re: Overload what to fix "Julia Client - Internal Error" with subtype of AbstractArray?

2016-09-29 Thread randmstring
That error happens because your subtyping isn't entirely correct: IsModifiedArray{Float64, 1} <: AbstractArray{Float64, 1} == false with your definition. If you do abstract SpecialArray{T,S} <: AbstractArray{T,S} type IsModifiedArray{T,S} <: SpecialArray{T,S} values :: Array{T,S}

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

2016-09-16 Thread randmstring
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 documentation , which describes all that pretty nicely.

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

2016-09-16 Thread randmstring
The error I'm getting is something like ERROR: LoadError: UndefVarError: PhyNode not defined So since you used importall instead of using, you need to the qualified MyClasses.PhyNode. If you do, you'll probably get some error about ERROR: LoadError: MethodError: `convert` has no method

[julia-users] Re: Julia Low Pass Filter much slower than identical code in Python ??

2016-09-12 Thread randmstring
The Julia code takes 0.000535 seconds for me on the second run -- during the first run, Julia has to compile the method you're timing. Have a look at the performance tips

[julia-users] Re: [HELP] Doubts in Julia Language with Strings.. I've condensed my doubts into one Simple Program

2016-08-24 Thread randmstring
Note that the above solutions won't work if your input happens to be non-ascii -- g's code will give something like "3:3-5:2-4:�-�" as the output for "abcabü". Imho it's better to build the string you want in the end from scratch instead of treating it as a mutable object: input =

[julia-users] Re: Why does julia use END for block end?

2016-05-07 Thread randmstring
Also, since you're using Atom you could just edit your stylesheet (go to Settings => Themes and click the link at the top) to include something like atom-text-editor::shadow .keyword.control.end.julia { color: gray; } which would make the end a bit more subtle. Am Freitag, 6. Mai 2016

[julia-users] Re: Installation Problem

2016-04-26 Thread randmstring
Hi, there's no problem with the installation of either Atom or Juno or Julia, it's just that your home dir seems to be on a network drive and that doesn't play well with Julia's package manager. You could try setting the JULIA_PKGDIR environement variable to a folder on a local hard drive and

[julia-users] Re: I am Getting problem with julia and light table to work them together

2016-03-19 Thread randmstring
Hi Tanveer, the Julia plugin for LightTable isn't maintened anymore. Recent work has focussed on getting Julia nicely integrated into Atom -- you can find the install instructions for that here . There's also a nice piece on the

[julia-users] Re: Julia and Atom

2016-03-08 Thread randmstring
Hi, if you are using Juno (and therefore ink), this is this issue. Will most probably be fixed on the next release (also see this PR ). Regards, Sebastian Am Dienstag, 8. März 2016 19:35:36 UTC+1

[julia-users] Re: Atom inline evaluation shortcut

2015-12-12 Thread randmstring
Shift-Enter for evaling and jumping to the next executable block of code hasn't been implemented yet in Juno/Atom. See https://github.com/JunoLab/atom-julia-client/issues/24 and its dependency https://github.com/JunoLab/atom-julia-client/issues/9 . Am Samstag, 12. Dezember 2015 14:37:34 UTC+1

[julia-users] Re: How does 'find_library' works?

2015-11-17 Thread randmstring
julia> find_library(["libgmt.dylib"],["/Users/j/programs/gmt5/lib"]) should do the trick. The docs at least imply that both arguments should be vectors -- for one because of the plural and locations is supposed to be a list. Am Dienstag, 17. November 2015 15:24:38 UTC+1 schrieb J Luis: > >

[julia-users] Re: Why is the type of a variable different from inside and outside a let block?

2015-07-21 Thread randmstring
Surprising it may be, but also sensible. An assignment always returns the assigned value, not the variable it is assigned to: let x::Float64 = 5 x end::Float64 I think there's something in the docs that describes that behaviour, but I can't seem to find it right now... Am Dienstag,

[julia-users] Re: 2D plot in gadfly

2015-03-03 Thread randmstring
Nope, you can also use rectangular pixels: using Gadfly Xmin = Float64[] Xmax = Float64[] Ymin = Float64[] Ymax = Float64[] Z = Float64[] for x in 1:2:30, y in 1:20 push!(Xmin,x-1) push!(Ymin,y-0.5) push!(Xmax,x+1) push!(Ymax,y+0.5) push!(Z,x*y) end plot(x_min=Xmin,

[julia-users] Path separator on Windows

2014-09-15 Thread randmstring
Hello all, I recently encountered an issue https://github.com/JuliaLang/Tk.jl/issues/62#issuecomment-55392934 with path separators on Windows and was wondering why backslashes were chosen over slashes in Julia Base. Windows usually interprets / just as well as \, especially if the paths are