Re: [julia-users] Re: Defining a new numeric type with minimal effort

2016-06-11 Thread Jeffrey Sarnoff
> > , as 'Real' is expecting it to be named 'val'? Jeez, No, Real is an abstract type that is closer to being a label sewn to the root of a tree -- Real does not have any investment in how you name the fields of your type. There is no way of telling which fileds are accessed how by all methods

Re: [julia-users] inner constructor returning an object of a different type

2016-06-11 Thread Rafael Fourquet
In the pre-jb/functions era, where higher-order functions where suboptimal (because function calls would not specialize on them), there was a trick using the feature you noticed to overcome this limitation, i.e. make it fast. Cf the discussion at https://groups.google.com/d/topic/julia-users/qscRyN

[julia-users] ControKTH

2016-06-11 Thread Henri Girard
Hi, Does somebody knows where I can get the control toolbox ? EL1000 home page and download the ControlKTH.zip Is there other toolbox for julia ? Regards Henri

[julia-users] Re: ArrayFire.jl - GPU Programming in Julia

2016-06-11 Thread Ranjan Anantharaman
Hey, I'm also giving a talk on ArrayFire.jl at JuliaCon 2016 too: http://juliacon.org/abstracts.html#ArrayFire. See how ArrayFire.jl is useful in accelerating your code! Thanks, Ranjan On Friday, 10 June 2016 10:38:42 UTC+5:30, ran...@juliacomputing.com wrote: > > Hello, > > We are pleased to

[julia-users] Re: PyPlot: LineCollection help needed

2016-06-11 Thread Christoph Ortner
seems not. On Saturday, 11 June 2016 02:38:54 UTC+1, David P. Sanders wrote: > > Does it work with ax=gca() instead?

[julia-users] Re: Compose.jl animation

2016-06-11 Thread Ford O.
Thanks for help. I have ran into another issues: I want to draw cca 200 x 200 grid where each cell can contain different shape. Can I specify in julia box how large will be the canvas? Right now it uses only 50% of screen available. Compose doesn't distribute the objects equally for some reason

[julia-users] Re: ArrayFire.jl - GPU Programming in Julia

2016-06-11 Thread Andrew
I have very little knowledge of GPU computing. Is it possible to use the GPU for not just simple matrix operations, but for arbitrary functions? I think I'm looking here for a GPU pmap(f, A), where f is a function I've defined and A is some array with a few thousand elements. On Saturday, June

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

2016-06-11 Thread Marius Millea
Kinda new to Julia so not sure where to post this but I'll start here. The simple example from the docs involving @parallel and SharedArray doesn't seem to work. I would think I should end up with a=1:10, but instead it all zeros. _ _ _(_)_ | A fresh approach to technical computi

[julia-users] Re: PyPlot: LineCollection help needed

2016-06-11 Thread David P. Sanders
After looking at some matplotlib examples, it seems that the data structure needed by LineCollection in Python is a list of lists, with the inner lists being lists of (x,y) pairs. After playing around for a while, the following works for me for drawing a pair of lines in Julia: xs = [1., 3., 5.,

[julia-users] Re: Compose.jl animation

2016-06-11 Thread Michael Borregaard
It is not a full answer, but you should check ctxpromise() for the size. I think the distribution is because the canvas is not square and you use relative positions to specify circle centers. You can set the size parameters in the context call. Sorry I realise this is really useless in terms of

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

2016-06-11 Thread Daniel Carrera
Probably because the Julia module has different default values for the absolute and relative tolerance. For Julia, the defaults are reltol=1e-5 and abstol=1e-8 but in Matlab the defaults are RelTol=1e-3 and AbsTol=1e-6. https://github.com/JuliaLang/ODE.jl http://se.mathworks.com/help/matlab/ref

Re: [julia-users] Re: Defining a new numeric type with minimal effort

2016-06-11 Thread Kevin Kunzmann
Taking your last example to the console, still I cannot add two "Probabilities" despite them being instances of a subtype of "Real". What I was looking for is the Julian way of thinking about inherited behaviour from numeric types. Now, I slowly wrap my mind around the idea that there s nothing

Re: [julia-users] Re: Defining a new numeric type with minimal effort

2016-06-11 Thread Jeffrey Sarnoff
This way of which you speak, there are whispers ... Let me become strong with milk of Yak, for I must swim with the Platypus of Insight as dawn is drawn from glimmer to glisten. ... . . . .. ... .. . (writing becomes written) On Saturday, June 11, 2016 at 11:09:34 AM UTC-4, Ke

[julia-users] Re: ArrayFire.jl - GPU Programming in Julia

2016-06-11 Thread Simon Danisch
That would need the capability of compiling arbitrary Julia functions for the GPU. If you remove the arbitrary (no allocations, no exceptions, no IO) and are confident with trying out prototypes, this already exists for NVidia GPU's: https://github.com/JuliaGPU/CUDAnative.jl If you only have a c

Re: [julia-users] Re: Defining a new numeric type with minimal effort

2016-06-11 Thread Kevin Squire
Hi Kevin, As you're gleaming, you will need to implement a set of basic functions, and that set isn't tiny. That said, once you implement this minimal set, your type should be usable everywhere else that a Real is accepted (even when that doesn't always make sense). For some idea of what is need

Re: [julia-users] Re: [ANN]: ScikitLearn.jl 0.1.0 released, now with Julia ecosystem support

2016-06-11 Thread Ayush Pandey
Nice!! I would be using this for my next Machine Learning project. Thanks :D *Yours Sincerely,* *Ayush Pandey* * * *LinkedIn Profile * *GitHub * On Fri, Jun 10, 2016 a

[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: PyPlot: LineCollection help needed

2016-06-11 Thread Christoph Ortner
thanks, David, this will be useful for me as well! C On Saturday, 11 June 2016 15:20:52 UTC+1, David P. Sanders wrote: > > After looking at some matplotlib examples, it seems that the data > structure needed by LineCollection in Python > is a list of lists, with the inner lists being lists of (x,

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

2016-06-11 Thread Tony Kelman
That matrix is indefinite. Cholmod only implements diagonal pivoting (modified Cholesky, will work for semidefinite or some special cases of indefinite like quasidefinite), not the general symmetric indefinite Bunch-Kaufman factorization with 2-by-2 pivots. Assuming you actually care about spar

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

2016-06-11 Thread Tony Kelman
For now, you can just manually make the same cholmod calls that cholfact does, then use the same check that cholfact is currently using for throwing a PosDefException, to instead return false (or use the just-computed factorization as desired, when it succeeds) - see https://github.com/JuliaLan

Re: [julia-users] ControKTH

2016-06-11 Thread Stefan Karpinski
The top Google hit on "ControKTH" is this message thread. After that the hits are all nonsense. It's also completely unclear what EL1000 is supposed to be. On Sat, Jun 11, 2016 at 6:06 AM, Henri Girard wrote: > Hi, > Does somebody knows where I can get the control toolbox ? > > EL1000 home page

[julia-users] error in loop

2016-06-11 Thread digxx
I have a loop in which I have a root finding function. Sometimes the starting condition is not adequate and the function errors. Is it possible to somehow check first if the function errors before I actually run the function and then crashing the program.

[julia-users] Re: error in loop

2016-06-11 Thread digxx
In particular I would use this to then change the inital condition slightly and look if the root finding algorithm works better this time...

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

2016-06-11 Thread jmarcellopereira
Hi daniel in fact, there is a relationship with the tolerance between the methods. Em sábado, 11 de junho de 2016 11:51:53 UTC-3, Daniel Carrera escreveu: > > Probably because the Julia module has different default values for the > absolute and relative tolerance. For Julia, the defaults are rel

Re: [julia-users] Re: error in loop

2016-06-11 Thread Yichao Yu
On Sat, Jun 11, 2016 at 7:59 PM, digxx wrote: > In particular I would use this to then change the inital condition slightly > and look if the root finding algorithm works better this time... You'll need to be more specific about your problem. Pure julia code shouldn't crash if it throws an error

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

2016-06-11 Thread jmarcellopereira
Hi erick in fact erick, there is an error!hehe. I did not realize before. Em sexta-feira, 10 de junho de 2016 23:38:11 UTC-3, Erik Schnetter escreveu: > > When you write `(...)^1/8`, you probably mean `(...)^(1/8)` instead. > > -erik > > On Fri, Jun 10, 2016 at 10:29 PM, > > wrote: > >> this is t

Re: [julia-users] Re: error in loop

2016-06-11 Thread digxx
I'm using Roots with fzero. Occasionally fzero(f,[a,b]) says its not a bracket. How can I first check for the error ?

Re: [julia-users] Re: error in loop

2016-06-11 Thread Yichao Yu
On Sat, Jun 11, 2016 at 8:28 PM, digxx wrote: > I'm using Roots with fzero. > Occasionally fzero(f,[a,b]) says its not a bracket. How can I first check > for the error ? > You can just catch the error. with try catch end >

Re: [julia-users] Re: error in loop

2016-06-11 Thread digxx
Thx...

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

2016-06-11 Thread colintbowers
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 8 Is this desired behaviour or is it a bug? Based on a quick scan, I can't quite te

Re: [julia-users] ControKTH

2016-06-11 Thread Christian Peel
Here are two pertinent links * https://www.kth.se/polopoly_fs/1.627826!/harenstam-nielsen_lindemann.pdf * https://www.kth.se/social/files/55f124f8f276547bba8a16f9/controldoc.pdf I guess they refer to a student project to implement basic control theory concepts in Julia. Even if it is not too fancy