[julia-users] Re: Are there some hierarchical clustering and information theory tools on Julia ?

2014-01-20 Thread Diego Javier Zea
for the Clustering package as part of my M.S. thesis. Did you ever move forward with this project? If not, I might. Thanks On Monday, April 1, 2013 5:28:16 PM UTC-7, Diego Javier Zea wrote: Did somebody something on that direction? I want to implement a Mutual Information calculation after

[julia-users] Re: Best way to convert Any of vectors into matrix

2014-08-22 Thread Diego Javier Zea
A = Any[[1,2],[3,4],[5,6]] function to_matrix(A::Vector{Any}) ncol = length(A) nrow = length(A[1]) B = Array( typeof(A[1][1]) , (nrow, ncol) ) for i in 1:ncol for j in 1:nrow B[j,i] = A[i][j] end end

[julia-users] How do I add to REQUIRE an unregistered package?

2015-07-03 Thread Diego Javier Zea
Hi! How do I add to REQUIRE a package which isn't in METADATA? ... https://github.com/diegozea/ROC.jl for example. Best,

Re: [julia-users] Re: How do I add to REQUIRE an unregistered package?

2015-07-04 Thread Diego Javier Zea
Thanks Tony! :) I will follow the issue

Re: [julia-users] What is the correct way for function parameter list generation with @eval?

2015-08-01 Thread Diego Javier Zea
Thanks! I wasn't able to solve the problem with code generation (It was more complicated than the example), but I solved it using multiple dispach of the especial code :) On Friday, July 31, 2015 at 3:53:28 PM UTC-3, Yichao Yu wrote: On Fri, Jul 31, 2015 at 2:46 PM, Diego Javier Zea dieg

Re: [julia-users] I need help with this constructor on Julia 0.4

2015-07-28 Thread Diego Javier Zea
Thanks Yichao! :) El martes, 28 de julio de 2015, 17:19:35 (UTC-3), Yichao Yu escribió: On Tue, Jul 28, 2015 at 4:13 PM, Diego Javier Zea dieg...@gmail.com javascript: wrote: Hi! I need help with this constructor on Julia 0.4. What is the correct form for write different constructors

[julia-users] What is the correct way for function parameter list generation with @eval?

2015-07-31 Thread Diego Javier Zea
Hi! I don't know how to generate parameter list of functions in order to avoid a lot repetitive code: julia for (param, special) in [ (:(),:()), (:(, y),:(+ y)) ] @eval begin function f(x $(param), z) x $(special) + z end end end

[julia-users] I need help with this constructor on Julia 0.4

2015-07-28 Thread Diego Javier Zea
Hi! I need help with this constructor on Julia 0.4. What is the correct form for write different constructors for D being 1, 2, 3... ? Thanks julia immutable AdditiveSmoothing{T} λ::T end julia type ResidueCount{T, D} N::Array{T, D} end julia

[julia-users] Re: I need help with test_throws

2015-08-06 Thread Diego Javier Zea
Thanks Tim Michael! :)

[julia-users] I need help with test_throws

2015-08-05 Thread Diego Javier Zea
*What is the correct way for testing* throw(message) *?* *I'm getting this errors using test_throws. ¿What am I doing wrong? The deprecation message is confusing.* julia using Base.Test julia IndexedVector([1,2,3,3]) ERROR: 3 is more than one time in the vector. in call at

[julia-users] Incremental RAM usage on loop

2015-10-23 Thread Diego Javier Zea
The script https://github.com/diegozea/MIToS.jl/blob/master/scripts/Distances.jl is consuming more RAM on each iteration of *pmap*. How can I avoid it? Best

Re: [julia-users] Re: Why am I getting this error?

2015-10-22 Thread Diego Javier Zea
22, 2015 at 12:56 PM, Diego Javier Zea <diego...@gmail.com> > wrote: > > Looks like it's using too much RAM and the system is killing it. I get a: > > ProcessExitedException() > > The lack of a better error was the reason it took a long time to > notice the OOM

[julia-users] Why am I getting this error?

2015-10-22 Thread Diego Javier Zea
I am running this script on a large list (92003 lines) of files. At some point I'm getting this error (unrelated to the files since works fine for a while if I continue from the last file): ERROR (unhandled task failure):

[julia-users] Re: Why am I getting this error?

2015-10-22 Thread Diego Javier Zea
Looks like it's using too much RAM and the system is killing it. I get a: ProcessExitedException() El jueves, 22 de octubre de 2015, 13:09:21 (UTC-3), Diego Javier Zea escribió: > > I am running this script > <https://github.com/diegozea/MIToS.jl/blob/master/scripts/Distances.jl>

Re: [julia-users] Google releases TensorFlow as open source

2015-11-10 Thread Diego Javier Zea
+1 It would be good to have a *TensorFlow.jl*!

[julia-users] When to use Symbol instead of ASCIIString on function arguments?

2015-08-29 Thread Diego Javier Zea
Hi! I'm confused with this... When do I need to use Symbol instead of ASCIIString on function arguments? Which of the following is the best and Julian definition? julia myfunstr{T}(x::T; method::ASCIIString=one) = method==one ? one(T )+x : x myfunstr (generic function with 1 method) julia

Re: [julia-users] When to use Symbol instead of ASCIIString on function arguments?

2015-08-30 Thread Diego Javier Zea
Thanks! I didn't know about enum types!

Re: [julia-users] When to use Symbol instead of ASCIIString on function arguments?

2015-08-30 Thread Diego Javier Zea
Thank René!

Re: [julia-users] When to use Symbol instead of ASCIIString on function arguments?

2015-08-30 Thread Diego Javier Zea
Thanks! One more question, what is the difference between this two definitions: julia f(x) = x f (generic function with 1 method) julia g(x) = identity(x) g (generic function with 1 method) julia f(10) 10 julia g(10) 10

Re: [julia-users] Has std() enough precision?

2015-09-06 Thread Diego Javier Zea
Ok... I decided to compare against* eps(Float64)* function calculatezscore{T,N}(value::AbstractArray{T,N}, average:: AbstractArray{T,N}, sd::AbstractArray{T,N}, tolerance::T=eps(T)) zscore = similar(value) if size(value) == size(average) == size(sd) for i in eachindex(zscore) val =

Re: [julia-users] Has std() enough precision?

2015-09-06 Thread Diego Javier Zea
Is correct to sum other number in order to compare? julia> r_std 1.3877787807814457e-17 julia> isapprox(r_std, 0.0) false julia> isapprox(r_std + 0.01, 0.01) true julia> julia> eps(r_std + 0.01) 2.117582368135751e-22 julia> eps(0.01) 2.117582368135751e-22

Re: [julia-users] Has std() enough precision?

2015-09-06 Thread Diego Javier Zea
ia> sum(a)/100 - total > -1.3877787807814457e-17 > > But this is off by only one ulp: > > julia> nextfloat(sum(a)/100) == total > true > > So my advice is that you should write your algorithms in a manner that > takes > the realities of floating-point arithmetic

Re: [julia-users] Has std() enough precision?

2015-09-06 Thread Diego Javier Zea
> > julia> eps(1e-10) > 1.2924697071141057e-26 > > julia> eps(1e-100) > 1.2689709186578246e-116 > > --Tim > > On Sunday, September 06, 2015 06:39:06 PM Diego Javier Zea wrote: > > Thanks Tim! But I don't fully understand it, because I believed that* > >

[julia-users] How can I delete columns of a matrix in-place?

2015-09-06 Thread Diego Javier Zea
Is there some function for deleting columns in-place? I want to do something like the next, but changing the matrix in-place. julia> mat = [ 1 2 3 4 5 6 ] 2x3 Array{Int64,2}: 1 2 3 4 5 6 julia> mat[:, [true, false, true]] 2x2 Array{Int64,2}: 1 3 4 6 Thanks in advance!

[julia-users] Re: I don't understand the behaviour of macros and let.

2015-09-12 Thread Diego Javier Zea
ill be expanded at compile time to: > let m = "hola" >dump(m) > end > so they're in the same scope now. > You might find macroexpand useful: macroexpand(:( @mymacro my_expr))) > > Am Samstag, 12. September 2015 23:45:23 UTC+2 schrieb Diego Javier Zea: >>

[julia-users] I don't understand the behaviour of macros and let.

2015-09-12 Thread Diego Javier Zea
I don't understand why am I getting this error? My macros can not find the variables inside *let* blocks. How Can I fix it? Thanks in advance julia> macro example(var) dump(var) @eval dump($var) end julia> msg = "hola" "hola" julia> @example msg Symbol msg ASCIIString

[julia-users] [ANN] PairedListMatrices.jl

2015-09-13 Thread Diego Javier Zea
I was trying to save a matrix of *88000 x 88000* distances on a *Symmetric *but I got an *OutOfMemoryError*. Trying to use a sparse matrix solves the memory problem, but takes more than 12 hours to finish. So I create this package (https://github.com/diegozea/PairedListMatrices.jl) for solve

Re: [julia-users] I don't understand the behaviour of macros and let.

2015-09-12 Thread Diego Javier Zea
> only to the code generated by that macro. > > > On Sat, Sep 12, 2015 at 5:45 PM Diego Javier Zea <dieg...@gmail.com > > wrote: > >> I don't understand why am I getting this error? My macros can not find >> the variables inside *let* blocks. How Can I f

[julia-users] I'm having problems with Pkg.publish()

2015-09-13 Thread Diego Javier Zea
I'm getting this problem with *git* when I do* Pkg.publish()*. How can I solve it? Thanks julia> Pkg.publish() INFO: Validating METADATA INFO: Pushing PairedListMatrices permanent tags: v0.0.1, v0.0.2 INFO: Submitting METADATA changes INFO: Forking JuliaLang/METADATA.jl to diegozea INFO: Could

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

2015-09-15 Thread Diego Javier Zea
eptember 13, 2015 at 4:29:15 AM UTC-5, Diego Javier Zea wrote: >> >> I was trying to save a matrix of *88000 x 88000* distances on a *Symmetric >> *but I got an *OutOfMemoryError*. Trying to use a sparse matrix solves >> the memory problem, but takes more than 12 hours

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

2015-09-21 Thread Diego Javier Zea
Hi! A new version of this package *(v0.1.0)* is under the name *PairwiseListMatrices*: https://github.com/diegozea/PairwiseListMatrices.jl This package works on Julia 0.4 and allows you to use a pairwise or paired list as a matrix (using aprox.* N*N/2* instead of *N*N *space). There is an

[julia-users] Test for warnings

2015-08-28 Thread Diego Javier Zea
How can I test for warnings using Base.Test? julia using Base.Test julia @test_throws ___ warn(Test it me) Thanks

[julia-users] Why variables passed to this macro are referencing to the module?

2015-12-18 Thread Diego Javier Zea
I defined the macro @iteratelist in PairwiseListMatrices. I used a similar macro in function definitions

[julia-users] Re: Why variables passed to this macro are referencing to the module?

2015-12-18 Thread Diego Javier Zea
ber 18, 2015 at 9:02:08 PM UTC-3, Diego Javier Zea wrote: > > I defined the macro @iteratelist > <https://github.com/diegozea/PairwiseListMatrices.jl/blob/master/src/macros.jl#L1-L27> > > in PairwiseListMatrices. I used a similar macro in function definitions >

[julia-users] Is It safe to call a pmap inside a function called for another pmap?

2016-06-11 Thread Diego Javier Zea
How does Julia distribute jobs in the following example? julia> @everywhere begin g(n) = pmap(x -> x/10,1:n) f(n) = sum(g(n)) end julia> pmap(f,1:10) 10-element Array{Any,1}: 0.1 0.3 0.6 1.0 1.5 2.1 2.8 3.6 4.5 5.5 NOTE: The result is correct and it's only a toy

[julia-users] Re: UInt8 in hist()

2016-02-04 Thread Diego Javier Zea
Hi! I can't understand your question/problem... Are you looking for something like this: julia> using Gadfly julia> A = rand(UInt8, 1000); julia> B = rand(UInt8, 1000); julia> plot(layer(x=A, Geom.histogram, Theme(default_color=colorant"orange" )), layer(x=B, Geom.histogram,

[julia-users] Re: Crashing while parsing large XML file

2016-01-28 Thread Diego Javier Zea
Hi! Why you are using for line in eachline(f) l = readline(f) instead of for l in eachline(f) ? Best El jueves, 28 de enero de 2016, 12:42:35 (UTC-3), Brandon Booth escribió: > > I'm parsing an XML file that's about 30gb and wrote the loop below to > parse it line by line. My code

[julia-users] Re: How to data Geom.smooth Gadfly

2016-01-21 Thread Diego Javier Zea
Hi! You should check the Loess package: https://github.com/dcjones/Loess.jl Best, El jueves, 21 de enero de 2016, 6:39:32 (UTC-3), jmarcell...@ufpi.edu.br escribió: > > Geom.smooth create an fitting line on the points. How to get the data from > this line? > > ex > x =

[julia-users] Re: Plotsly

2016-03-09 Thread Diego Javier Zea
Awesome work, guys. Plots + PlotlyJS is my favorite plotting combination right now :D El miércoles, 9 de marzo de 2016, 13:14:48 (UTC-3), Tom Breloff escribió: > > For anyone interested, Spencer Lyon and I have been trying to get his > great PlotlyJS package working with the Plots.jl API...

[julia-users] Re: can't get pyjulia to work

2016-03-14 Thread Diego Javier Zea
*I'm also having troubles with pyjulia... Is there a way to solve this problem? Best* diego@SIRRAH:~$ julia _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type

[julia-users] ANN: MIToS v1.0 Released

2016-04-04 Thread Diego Javier Zea
Hi All, We've released the 1.0 version of *MIToS *! Changes are documented in the NEWS.md file. This version includes a new module: *Pfam*. It integrates Information, MSA, PDB and SIFTS modules

Re: [julia-users] I need some advise about File IO in Julia

2016-04-04 Thread Diego Javier Zea
Hi! Finally, I have a PDB and PDBML (xml) parser in the *PDB module* of *MIToS *(the *documentation* is in *http://mitos.leloir.org.ar* ). Best, El lunes, 14 de marzo de 2016, 15:49:44 (UTC-3), Joe Greener escribió: > >

[julia-users] ERROR: LoadError: could not spawn `make all`: no such file or directory (ENOENT)...while loading ...\Rif.jl,

2016-07-03 Thread Diego Javier Zea
Hi! There is another package for using R from Julia named RCall.jl RCall works fine in Windows. Best,

[julia-users] Threads.@threads and throw ErrorException interaction

2016-10-07 Thread Diego Javier Zea
Hi, I was starting to play with* Threads.@threads *and I noticed a strange behaviour when the macro is used together with *throw* and *ErrorException*: | | |_| | | | (_| | | Version 0.5.0 (2016-09-19 18:14 UTC) _/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release |__/

Re: [julia-users] Threads.@threads and throw ErrorException interaction

2016-10-07 Thread Diego Javier Zea
Thanks Yichao, I found the related issue: https://github.com/JuliaLang/julia/issues/17532 Also I found useful your comment about task and IO in this issue: https://github.com/JuliaLang/julia/issues/14494 Thanks!

Re: [julia-users] @threads not providing as big speedup as expected

2016-08-29 Thread Diego Javier Zea
Looks like the type of *d_cl* isn't inferred correctly. *d_cl = Dict(i => ones(3,3,nl) for i=1:np)::Dict{Int64,Array{Float64,3}}* helps with that, but I din't see a change in performance. Best

Re: [julia-users] Most effective way to build a large string?

2016-10-14 Thread Diego Javier Zea
Hi! I have a function that uses `IOBuffer` for this creating one `String` like the example. Is it needed or recommended `close` the IOBuffer after `takebuf_string`? Best! On Tuesday, February 17, 2015 at 1:47:08 PM UTC-3, Stefan Karpinski wrote: > > IOBuffer is what you're looking for: > > buf