[julia-users] Re: Pivoting when inverting a sparse matrix

2016-06-12 Thread Gabriel Goh
Thanks! You are right, my matrix is symmetric but indefinite, Is there a foolproofway to construct an LDLt factorization to take advantage of the structure without falling back to LU? This seems like an unnecessary limitation Gabe On Sunday, June 12, 2016 at 6:50:43 AM UTC-7, Andreas Noack

[julia-users] Re: ANN: DC.jl - automagical linked plots in your IJulia Notebook

2016-06-12 Thread Eric Forgy
What about DCJS.jl to be consistent with PlotlyJS.jl and ThreeJS.jl? The JS library is DC.js and is known as such so I would think DCJS.jl would be alright.

[julia-users] Re: Problem with Homebrew after Pkg.update()

2016-06-12 Thread Fabrice Collard
Sorry, was away. Running the Pkg.status() I get 21 required packages: - Clp 0.2.1 - DSP 0.0.11 - DataFrames0.7.3 - Distributions 0.9.0 - FastGaussQuadrature 0.0.3 - Formatting

Re: [julia-users] Plotting lots of data

2016-06-12 Thread Tim Holy
If you can use OpenGL, consider GLVisualize.jl. --Tim On Sunday, June 12, 2016 1:31:06 PM CDT CrocoDuck O'Ducks wrote: > Hi there! > > I have been experimenting a little with many plotting packages recently. > Being used to Matlab PyPlot seemed to work well for me... until this bug >

Re: [julia-users] How can I define an anonymous function with keyword arguments

2016-06-12 Thread Yichao Yu
On Sun, Jun 12, 2016 at 4:06 PM, Xiaoqing Rong-Mullins wrote: > I want to define a series of anonymous functions, where each will be a value > in a Dict and/or a field value in a composite type. I need to be able to use > them for multiple times with different choices of

[julia-users] How can I define an anonymous function with keyword arguments

2016-06-12 Thread Xiaoqing Rong-Mullins
I want to define a series of anonymous functions, where each will be a value in a Dict and/or a field value in a composite type. I need to be able to use them for multiple times with different choices of arguments, including keyword arguments. How many of them are defined at runtime depends on

[julia-users] Packages Distances problem with Distances.Jaccard : very slow

2016-06-12 Thread jean-pierre both
I encountered in my application with Distances.Jaccard compared with Distances.Euclidean It was very slow. For example with 2 vecteurs Float64 of size 11520 I get the following julia> D=Euclidean() Distances.Euclidean() julia> @time for i in 1:500 evaluate(D,v1,v2) end

[julia-users] Jaccard Distance very slow in Packages Distances

2016-06-12 Thread jean-pierre both
using Distances v1=rand(1) v2=rand(1) function testDistances(v1::Array{Float64,1}, v2::Array{Float64,1}, D::SemiMetric) for i in 1:5000 evaluate(D,v1,v2) end end @time testDistances(v1,v2,Jaccard()) 18.351446 seconds (350.02 M allocations: 5.961 GB,

[julia-users] MethodError closest candidate is same as "no matching method" method

2016-06-12 Thread michael
I am using a fork of Nemo I modified to support a fork of FLINT so I could use the function snf_with_transform . The Julia script I'm using works great in some cases. I'm scheduling it with

[julia-users] Re: Pesky type instability

2016-06-12 Thread Matt Bauman
Constructing expressions with strings for a generated function is definitely much more complicated and harder to read. And it'll almost certainly take more resources and time during compilation. You'll probably also be very interested in Base.Cartesian. See the developer documentation here:

[julia-users] Re: Pesky type instability

2016-06-12 Thread Kristoffer Carlsson
Yes the splatting is the problem. But since you are using a generated function you can just generate code to avoid splatting. Evaling a string should on 0.4 not affect the performance of the generated function but on 0.5 I think you can't even call eval in generated functions (for technical

[julia-users] Re: ANN: DC.jl - automagical linked plots in your IJulia Notebook

2016-06-12 Thread Tim Wheeler
Now renamed to CrossfilterCharts.jl to make it METADATA-friendly. On Wednesday, June 1, 2016 at 9:28:07 PM UTC-7, Tim Wheeler wrote: > > Hello Julia Users, > > We are happy to announce DC.jl - a > package

[julia-users] Re: The simple @parallel example from the docs not working

2016-06-12 Thread Marius Millea
Ah, I missed in the docs that if you don't give a reduction operator it executes asynchronously and you need to prepend with @sync to make sure there workers have actually finished running the loop. On Saturday, June 11, 2016 at 4:02:31 PM UTC+2, Marius Millea wrote: > > Kinda new to Julia

[julia-users] Re: Pesky type instability

2016-06-12 Thread Richard Dennis
Hi Kristoffer, yes, the return type is stable because I explicitly declared weights as Array{T,N}. With order being a 1D array it needs to be "converted" to a tuple to initialize the weights array and I don't see too many ways of doing this. The problem seems to be present is the following

[julia-users] Re: local package, howto?

2016-06-12 Thread Dan
Not sure, but I may have had a similar problem and doing (in the shell): git config --global url."https://".insteadOf git:// solved it. On Sunday, June 12, 2016 at 1:42:13 PM UTC-4, Andreas Lobinger wrote: > > Hello colleagues, > > like with similar problems, i don't know how i ended up

[julia-users] Re: Pesky type instability

2016-06-12 Thread Kristoffer Carlsson
I would discourage generating code by creating strings and parsing them. It is much better to use actual julia expressions. Anyway, from what I see, you don't have a problem with the return type but with an intermediate value and that is from doing this: julia> g{S}(order::Array{S}) =

Re: [julia-users] How to launch a Julia cluster under Torque scheduler

2016-06-12 Thread David Parks
Nice idea Erik, I appreciate it! Though if I'm not wrong this locks me into only using MPI as the only transport mechanism and I want to use julias remotecall and other built in functionality rather than just MPI constructs. I see that the latest documentation for julia shows a --bind-to option

Re: [julia-users] Re: function! vs. function

2016-06-12 Thread digxx
> > Indeed embarassing -.- But yeah I was just confused thx anyway.

[julia-users] Pesky type instability

2016-06-12 Thread Richard Dennis
I wrote a generate function to compute Chebyshev weights using Chebyshev regression. I'm sure that there are many ways the code could be improved, but at the top of my list is eliminating what appears to be a type instability whose source I'm having trouble locating using @code_warntype. Any

[julia-users] Re: Plotting lots of data

2016-06-12 Thread Robert Gates
PlotlyJS.jl is a great tool, we use it to plot the boundary meshes of 3D finite element models as well as result data. Seems to handle large datasets well. The API is well-documented and everything works as expected. On Sunday, June 12, 2016 at 11:31:06 PM UTC+3, CrocoDuck O'Ducks wrote: > > Hi

Re: [julia-users] Re: Compose.jl animation

2016-06-12 Thread Ford O.
So I have moved a little bit further but it seems I am stuck again. I am using IJulia with Atom and Hydrogen (atom plugin). - Compose.set_default_graphic_size() can set the canvas size at most to ~20inches x ~20inches. - When using the code from reactive tutorial (below) and running

[julia-users] Plotting lots of data

2016-06-12 Thread CrocoDuck O'Ducks
Hi there! I have been experimenting a little with many plotting packages recently. Being used to Matlab PyPlot seemed to work well for me... until this bug I did not figure out how to workaround. I often need to plot a lot of data. The fact is

[julia-users] Re: Status of FEM packages

2016-06-12 Thread CrocoDuck O'Ducks
Cool stuff! Many thanks for the info, plenty of stuff to look at. Glad to see that a lot is going on.

Re: [julia-users] ControKTH

2016-06-12 Thread Linus Härenstam-Nielsen
Here we go: https://github.com/Linusnie/ControlBasic Note that at the time I used a 0.4.0 dev build so everything might not work properly. On Sunday, June 12, 2016 at 7:35:51 PM UTC+2, Linus Härenstam-Nielsen wrote: > > Hi author of (part of) ControlKTH here > > This was indeed a student

Re: [julia-users] Re: function! vs. function

2016-06-12 Thread Yichao Yu
On Sun, Jun 12, 2016 at 2:27 PM, digxx wrote: > Thx evan. > just to clarify: when calling: > function f(a,farr) > for i=1:n > for j=1:n > farr[j,i] = (a[j,:]*a[:,i] - A[j,:]*a[:,i])[1] - k2[j,i] > end > end > end > > f(x) with my previously defined x I get an error > >

[julia-users] Re: function! vs. function

2016-06-12 Thread Kristoffer Carlsson
You probably defined an f!(x) function earlier in your REPL session. Restart the REPL or run workspace()and try again. On Sunday, June 12, 2016 at 8:27:32 PM UTC+2, digxx wrote: > > Thx evan. > just to clarify: when calling: > function f(a,farr) > for i=1:n > for j=1:n > farr[j,i] =

[julia-users] Re: function! vs. function

2016-06-12 Thread digxx
Thx evan. just to clarify: when calling: function f(a,farr) for i=1:n for j=1:n farr[j,i] = (a[j,:]*a[:,i] - A[j,:]*a[:,i])[1] - k2[j,i] end end end f(x) with my previously defined x I get an error while calling function f!(a,farr) for i=1:n for j=1:n farr[j,i] = (a[j,:]*a[:,i] -

[julia-users] Re: function! vs. function

2016-06-12 Thread Evan Fields
Apologies if this is obvious, but: appending ! to a function name doesn't do anything special. It is convention to "append ! to names of functions that modify their arguments" (from the manual, section style guide). But this is just a naming convention and doesn't affect how the function is

Re: [julia-users] Re: function! vs. function

2016-06-12 Thread Milan Bouchet-Valat
Le dimanche 12 juin 2016 à 10:13 -0700, digxx a écrit : > the function I defined above? Or what do you mean? > function f!(a,farr) > for i=1:n > for j=1:n > farr[j,i] = (a[j,:]*a[:,i] - A[j,:]*a[:,i])[1] - k2[j,i] > end > end > end That method requires two

[julia-users] local package, howto?

2016-06-12 Thread Andreas Lobinger
Hello colleagues, like with similar problems, i don't know how i ended up there, but my question is how to avoid Being asked for githup authentification for a package that exists only locally (i.e. has no remote on github or similar)? julia v0.4.5 was not updated for long, but yesterday i ran

Re: [julia-users] ControKTH

2016-06-12 Thread Linus Härenstam-Nielsen
Hi author of (part of) ControlKTH here This was indeed a student project last summer, we based the development on Control.jl . We decided not to post the code publicly under the university name since I copied part of MatLab's algorithm for drawing root

[julia-users] Re: function! vs. function

2016-06-12 Thread digxx
the function I defined above? Or what do you mean? function f!(a,farr) for i=1:n for j=1:n farr[j,i] = (a[j,:]*a[:,i] - A[j,:]*a[:,i])[1] - k2[j,i] end end end

[julia-users] function! vs. function

2016-06-12 Thread Kristoffer Carlsson
What is f! (X)?

[julia-users] function! vs. function

2016-06-12 Thread digxx
So now I'm using this function A=[[2,1.]';[1,4]'] k2=Diagonal([3.,11.])^2 x=[[1,2]';[3.,4]'] farr=zeros(2,2) n=length(x[:,1]) kd(i,j)=Int64(i .== j) function f!(a,farr) for i=1:n for j=1:n #for k=1:n farr[j,i] = (a[j,:]*a[:,i] - A[j,:]*a[:,i])[1] - k2[j,i] #end end end end When I calculate

Re: [julia-users] Re: Compose.jl animation

2016-06-12 Thread Shashi Gowda
Yes, this is because the canvas is not square Run Compose.set_default_graphic_size(5inch, 5inch) Before drawing the picture... On 11-Jun-2016 8:08 PM, "Michael Borregaard" wrote: > > It is not a full answer, but you should check ctxpromise() for the size. I think the

Re: [julia-users] Re: testing positive definiteness via Cholesky?

2016-06-12 Thread Andreas Noack
We could consider not to throw in cholfact but only when the factorization is applied. This is what we do for LU and BunchKaufman. On Saturday, June 11, 2016 at 5:02:55 PM UTC-4, Tony Kelman wrote: > > For now, you can just manually make the same cholmod calls that cholfact > does, then use the

[julia-users] Re: Pivoting when inverting a sparse matrix

2016-06-12 Thread Andreas Noack
To start with the conclusion, the easiest solution here is to use the lufact, i.e. lufact(sparse(A))\ones(3). The explanation is that when a sparse matrix is symmetric, we first try to use a sparse Cholesky factorization and when that fails we try a sparse LDLt factorization. Both use Cholmod,

Re: [julia-users] I can enter the same keyword argument twice, and the second over-rules the first.

2016-06-12 Thread Tom Breloff
I just want to point out that this is a feature in my eyes, not a bug. It's very useful as a keyword override when splatting keywords. On Sunday, June 12, 2016, Milan Bouchet-Valat wrote: > Le samedi 11 juin 2016 à 19:46 -0700, colintbow...@gmail.com > a écrit

Re: [julia-users] Re: why the numerical result is different (RK45 julia and matlab)?

2016-06-12 Thread Daniel Carrera
I don't know what you are trying to say, but did you try running the two programs with the same relative and absolute tolerances? Do the results look more similar now? On 12 June 2016 at 02:01, wrote: > Hi daniel > in fact, there is a relationship with the

Re: [julia-users] I can enter the same keyword argument twice, and the second over-rules the first.

2016-06-12 Thread Milan Bouchet-Valat
Le samedi 11 juin 2016 à 19:46 -0700, colintbow...@gmail.com a écrit : > I can enter the same keyword argument twice, and the second entry is > the one that gets used. A short example follows: > > f(x::Int ; kw::Int=0) = x * kw > f(2) > f(2, kw=3) #evaluates to 6 > f(2, kw=3, kw=4) #evaluates to

Re: [julia-users] Re: Double free or corruption (out)

2016-06-12 Thread Nils Gudat
So it looks like I'm having the same issue - have been running the code without parallelization (defining my SharedArrays as regular ones), and it has now been going for about 3 days without any segfaults. Is this a known issue? If so, do we know whether there's a Julia version one can revert