[julia-users] Re: Error on argument when defining myconstraint function (using NLopt)

2016-06-20 Thread JC
Thank you! I also realized that an had that fixed. On Monday, June 20, 2016 at 11:28:23 PM UTC-4, Kristoffer Carlsson wrote: > > Your function body is the problem. How can you try to assign 0 to an > (rvalue) expression?

[julia-users] Error on argument when defining myconstraint function (using NLopt)

2016-06-20 Thread Kristoffer Carlsson
Your function body is the problem. How can you try to assign 0 to an (rvalue) expression?

Re: [julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
Welcome to ! First thanks, because I thaught I wouldn't get out of it ! I am following python because I am a very bad programmer but I like it ! In french, we haven't yet lot of Julia's users or I haven't met them. My aim now is to try to make the portrait phase accompanying this example from

Re: [julia-users] Linux Build Error

2016-06-20 Thread AB
Sorry! I thought that was the relevant part. I just ran make again. It returned this: In file included from src/s_fmax.c:32: src/fpmath.h:105: error: duplicate member ‘manl’ In file included from src/math_private.h:26, from src/s_fmax.c:33: src/math_private_openbsd.h:54:

Re: [julia-users] Linux Build Error

2016-06-20 Thread Yichao Yu
On Mon, Jun 20, 2016 at 7:50 PM, AB wrote: > Hello - > > I'm trying to install Julia on a machine at my university. > > When I run "make" the process terminates with the following errors: > > make[2]: *** [src/s_fmax.c.o] Error 1 > make[1]: *** >

[julia-users] Linux Build Error

2016-06-20 Thread AB
Hello - I'm trying to install Julia on a machine at my university. When I run "make" the process terminates with the following errors: make[2]: *** [src/s_fmax.c.o] Error 1 make[1]: *** [build/openlibm-e2fc5dd2f86f1e1dc47e8fa153b6a7b776d53ab5/libopenlibm.so] Error 2 make: *** [julia-deps]

Re: [julia-users] JuliaCon schedule announced

2016-06-20 Thread Viral Shah
Absolutely -viral > On 20-Jun-2016, at 3:28 PM, Evan Fields wrote: > > Can non-registered local Julia fans show up for the hackathon?

[julia-users] Error on argument when defining myconstraint function (using NLopt)

2016-06-20 Thread JC
My code is giving me an error message as below when making myconstraint function. *ERROR: syntax: "projone'" is not a valid function argument name* I am not sure why an argument for a function has to have a valid name unless they could overlap with the embedded arguments. Does anyone know what

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

2016-06-20 Thread David Parks
I meant that the MPI package doesn't create standard Julia workers, and hence doesn't allow you to using things like `remotecall(...)` and other julia-specific parallel constructs. By using the MPI package you are restricted to using the constructs supplied in the MPI package (or so it appears

[julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Gabriel Gellner
Welcome by the way! I used to use Python a lot myself. Julia is great, but it does require a fair amount of extra learning due to its youth. I hope you get past the rocky start :) ``` using PyPlot using PyCall @pyimport scipy.integrate as integrate function f(y, t) if t < 25 return

Re: [julia-users] Re: Deepcopy of BigInt and BigFloat (#16999)

2016-06-20 Thread Stefan Karpinski
If you hit issues with DoubleDouble and/or generic math algorithms in Julia's stdlib, please do file issues. We want to get to the point where *everything* just works. On Mon, Jun 20, 2016 at 4:31 PM, Chris Rackauckas wrote: > I see. I surely can't wait for native bigs, but

[julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
y1 (odeint arrays has nothing inside) that's why there is an error but from what ? Le lundi 20 juin 2016 17:32:07 UTC+2, Henri Girard a écrit : > > I am trying to convert from python to julia, but I don't know how to use > y1=integrate.odeint(f,t), apparently I should have add a derivativ ? > >

Re: [julia-users] Re: Deepcopy of BigInt and BigFloat (#16999)

2016-06-20 Thread Chris Rackauckas
I see. I surely can't wait for native bigs, but there are definitely more pressing issues to work on first. Tim's proof of principle results look really nice. I tried DoubleDouble and ran into some errors. I don't think it worked with all standard library math. I'll probably take another look

Re: [julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
What do you mean to change f(y,t) ? and what is 1-base arrays ? (does it mean it starts to 1 ?) I modify my code can you ajust it if you see problems ? @pyimport scipy.integrate as integrate function fₜ(y,t) if t<25

[julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
Thanks for helping :) I just found a simple scipy/python odeint I could translate, here it is, I uncommented ys=array(ys),flatten(), because i don't know what that means, but the example works even without it Now I will try my other programm with your suggestion and I will see the result ?

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

2016-06-20 Thread Kaj Wiik
For anyone trying to get things working in Ubuntu (Xenial) environment... I could not get ArrayFire.jl working with the binary libraries, compiling from source was quite easy and everything works now fine. On Friday, June 10, 2016 at 8:08:42 AM UTC+3, ran...@juliacomputing.com wrote: > >

Re: [julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Michele Zaffalon
And remember to change your f(y,t) because Julia has 1-based arrays. On Mon, Jun 20, 2016 at 9:32 PM, Michele Zaffalon < michele.zaffa...@gmail.com> wrote: > Also linspace(0.01,0) is not the same as [0.01,0] > > On Mon, Jun 20, 2016 at 8:15 PM, Henri Girard > wrote: > >>

Re: [julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Michele Zaffalon
Also linspace(0.01,0) is not the same as [0.01,0] On Mon, Jun 20, 2016 at 8:15 PM, Henri Girard wrote: > After correction still doesn't work. > I have this function from another programme which is working, i wonder if > it's not my odeint(f,y,t) which is wrong ? > > > Le

Re: [julia-users] jl_tuple2

2016-06-20 Thread Yichao Yu
On Mon, Jun 20, 2016 at 3:27 PM, Stephen Chisholm wrote: > While helping out with > http://stackoverflow.com/questions/37913625/call-julia-svd-from-c/37929076#37929076 > I noticed jl_tuple2 was removed in afd4eb038dcd9fa3e512509f4c332a9e7763ba59 > by Jeff Bezanson while

[julia-users] Re: JuliaCon schedule announced

2016-06-20 Thread Evan Fields
Can non-registered local Julia fans show up for the hackathon?

[julia-users] jl_tuple2

2016-06-20 Thread Stephen Chisholm
While helping out with http://stackoverflow.com/questions/37913625/call-julia-svd-from-c/37929076#37929076 I noticed jl_tuple2 was removed in afd4eb038dcd9fa3e512509f4c332a9e7763ba59 by Jeff Bezanson while refactoring tuples. Just wondering if anyone is able to help me find an alternative.

RE: [julia-users] Re: performance of parallel code

2016-06-20 Thread Boylan, Ross
I can do it using pmap, but it doesn't run any faster (still 3 workers): julia> @time h10 = Calculus.hessian(myf, RB.troubleParamsSim1.raw) 186.704029 seconds (410.30 k allocations: 29.503 MB, 0.01% gc time) That was using this code: """ Return a function that takes one argument, the

[julia-users] Re: "None" in Python and "nothing" in Julia for feature matching function

2016-06-20 Thread I Ce
Thanks Cedric, Upon some further inquiry, I agree. I do not think it is the `outImg` argument that is the problem, `nothing` worked just fine for another OpenCV function that had `None` written as a Python equivalent, as did the arguments for kp1, kp2, and the train and query images. The

[julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
Sorry I forget the function and following the example it should be for me : y=[0.01,0] function on_button_press(event) t_sim = linspace(0, 50, 200) x, y = event[:xdata], event[:ydata] x₀ = [x, y] ys = integrate.odeint(f, x₀, t_sim) plt[:plot](ys[:,1], ys[:,2], "k-", markersize=10) # path

Re: [julia-users] Re: Function in module templated on types defined later

2016-06-20 Thread Mauro
In that case, you need traits. In fact the motivating example I gave in my JuliaCon talk on this subject last year matches yours almost exactly: https://youtu.be/j9w8oHfG1Ic Anyway, probably you want to hand-code the Holy-traits. The example I give in my talk modified to fit your example:

[julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
After correction still doesn't work. I have this function from another programme which is working, i wonder if it's not my odeint(f,y,t) which is wrong ? Le lundi 20 juin 2016 17:32:07 UTC+2, Henri Girard a écrit : > > I am trying to convert from python to julia, but I don't know how to use >

Re: [julia-users] Re: Deepcopy of BigInt and BigFloat (#16999)

2016-06-20 Thread Stefan Karpinski
I think it might actually be easier for BigFloat since BigFloats are fixed-size, whereas BigInts are variable-size. Chris, there is a DoubleDouble package , which implements efficient higher-precision floating-point arithmetic, albeit not IEEE

Re: [julia-users] Re: Deepcopy of BigInt and BigFloat (#16999)

2016-06-20 Thread Tim Holy
On Sunday, June 19, 2016 at 10:20:11 PM UTC-5, Tim Holy wrote: > > Presumably if someone sat down and implemented similar operations in > pure-julia using, say, > tuples, it would blow away what we have now. Proof-of-principle in this gist:

Re: [julia-users] Re: Change url of a package

2016-06-20 Thread vincent leclere
Indeed ! There was a tag v0.1.2. I suppressed it and tagged again the correct version before using Pkg.publish(). It should be in order now. Thanks for your help. On Fri, 17 Jun 2016 at 22:59 Tony Kelman wrote: > How about in Pkg.dir("StochDynamicProgramming"), check `git

[julia-users] Re: Function in module templated on types defined later

2016-06-20 Thread amiksvi
Thanks to both of you for the replies. Module M contains a lot of functions for the simulation of dynamical models. Outside M, users are required to define some specific types to be consistent with another historical project. The definition of these types should be kept as simple as possible,

Re: [julia-users] integrate.odeint(f,t)

2016-06-20 Thread Michele Zaffalon
Your first line should be @pyimport scipy.integrate as integrate. On Mon, Jun 20, 2016 at 5:32 PM, Henri Girard wrote: > I am trying to convert from python to julia, but I don't know how to use > y1=integrate.odeint(f,t), apparently I should have add a derivativ ? > >

[julia-users] integrate.odeint(f,t)

2016-06-20 Thread Henri Girard
I am trying to convert from python to julia, but I don't know how to use y1=integrate.odeint(f,t), apparently I should have add a derivativ ? --python-- from scipy.integrate import odeint def f(y,t): if t<25: return [y[1],-8*y[0]+0.1*y[1]] elif 25

Re: [julia-users] Re: JuliaCon birds of a feather

2016-06-20 Thread Cedric St-Jean
+1, definitely interested in some of those subjects On Sunday, June 19, 2016 at 11:29:06 PM UTC-4, Tom Breloff wrote: > > Time to dredge this topic up again! With JuliaCon only a couple days > away, I want to make sure we take advantage of getting people in the same > room to collaborate. I'm

[julia-users] Re: scope of do block, generalization to for block

2016-06-20 Thread Cedric St-Jean
I'm not sure why assignments are local, but I'd guess that it's for consistency. function foo(x, y) ... end is syntactic sugar for foo = (x,y)->..., and likewise do syntax is also sugar for creating a function and passing it as the first argument. Since function foo(x) a = x end does not

[julia-users] Re: @pyimport error

2016-06-20 Thread Henri Girard
strange ... It doesn't work on my ubuntu python 2.7 By the way I want to this in julia y1=odeint(f,[0.01,0],t) but the python structure is different and it doesn't work, I am reading help for this but I haven't found yet an answer Le lundi 20 juin 2016 15:14:21 UTC+2, Henri Girard a écrit : > >

[julia-users] Re: Fast vector element-wise multiplication

2016-06-20 Thread chobbes158
Thanks for the confirmation! Yes, I need more tests to see what the best practice is for my particular problem. On Monday, June 20, 2016 at 3:05:31 PM UTC+1, Chris Rackauckas wrote: > > Most likely. I would also time it with and without @simd at your problem > size. For some reason I've had

Re: [julia-users] Function in module templated on types defined later

2016-06-20 Thread Mauro
On Mon, 2016-06-20 at 14:06, amik...@gmail.com wrote: > Hi, > > module M > function f{T1}(x::T1) return x.a end > function f{T2}(x::T2) return x.b + 1 end > export f > end This should probably read: module M function f(x::T1) return x.a end function f(x::T2) return x.b + 1 end export f end As

[julia-users] Re: @pyimport error

2016-06-20 Thread Gabriel Gellner
This should also work with python2 if you have the packages installed (I don't have a python 3 install on my machine and the import works). On Monday, June 20, 2016 at 6:30:36 AM UTC-7, Henri Girard wrote: > > Answering : I try with python3 and everything works > > Le lundi 20 juin 2016 15:14:21

[julia-users] Re: Fast vector element-wise multiplication

2016-06-20 Thread Chris Rackauckas
Most likely. I would also time it with and without @simd at your problem size. For some reason I've had some simple loops do better without @simd. On Monday, June 20, 2016 at 2:50:22 PM UTC+1, chobb...@gmail.com wrote: > > Thanks! I'm still using v0.4.5. In this case, is the code I highlighted

Re: [julia-users] A question of style: type constructors vs methods

2016-06-20 Thread Gabriel Gellner
That was what I was feeling. That this was a legacy issue for lowercase type "constructors". Thanks so much. On Monday, June 20, 2016 at 1:11:41 AM UTC-7, Mauro wrote: > > I think you should use the constructors if the user expects to construct > a certain type, e.g. `Dict()`. Conversely if

[julia-users] Re: Fast vector element-wise multiplication

2016-06-20 Thread chobbes158
Thanks! I'm still using v0.4.5. In this case, is the code I highlighted above still the best choice for doing the job? On Monday, June 20, 2016 at 1:57:25 PM UTC+1, Chris Rackauckas wrote: > > I think that for medium size (but not large) arrays in v0.5 you may want > to use @threads from the

[julia-users] Re: ComplexPhasePortrait

2016-06-20 Thread Henri Girard
Solved : Setting ENV to python3 works Le samedi 18 juin 2016 08:52:03 UTC+2, Henri Girard a écrit : > > HI, > I would like to use complexphaseportrait but I can't find any examples, > somebody can guide me to these ? > Regards > HG >

[julia-users] Re: @pyimport error

2016-06-20 Thread Henri Girard
Answering : I try with python3 and everything works Le lundi 20 juin 2016 15:14:21 UTC+2, Henri Girard a écrit : > > when I try scipy I can't get it working ? > > > @pyimport scipy.integrate as integrate > ERROR: PyError (:PyImport_ImportModule) > ImportError('No module named scipy.integrate',)

Re: [julia-users] Re: pyplot plots in atom Plots pane

2016-06-20 Thread Yaakov Borstein
@tom breloff: can I ask what you're using instead of Atom?

[julia-users] Re: Fast vector element-wise multiplication

2016-06-20 Thread Chris Rackauckas
I think that for medium size (but not large) arrays in v0.5 you may want to use @threads from the threadding branch, and then for really large arrays you may want to use @parallel. But you'd have to test some timings. On Monday, June 20, 2016 at 11:38:15 AM UTC+1, chobb...@gmail.com wrote: > >

[julia-users] Re: Function in module templated on types defined later

2016-06-20 Thread Fengyang Wang
This can't work because it would not, for instance, make sense to use module `M` independently. You could use the parent module from `M`, but as it stands that won't work either because loading the parent module will try to use `f` from `M`. What are you trying to do? On Monday, June 20, 2016

[julia-users] Function in module templated on types defined later

2016-06-20 Thread amiksvi
Hi, module M function f{T1}(x::T1) return x.a end function f{T2}(x::T2) return x.b + 1 end export f end using M type T1 a::Float64 end type T2 b::Float64 end t1 = T1(1.0) t2 = T2(2.0) println(f(t1)) println(f(t2)) This code doesn't work, how can I force the function templated for T1 to be used

[julia-users] scope of do block, generalization to for block

2016-06-20 Thread David van Leeuwen
Hello, I regularly make the mistake described here https://groups.google.com/d/msg/julia-users/UyCSm5Shyww/Udt67boT3CsJ, i.e., i write open(file) do fd a = read(fd, ...) b = read(fd, ...) end ## a and b undefined. I get that the solution is a, b = open(file) do fd ... Great. I

[julia-users] Re: performance of parallel code

2016-06-20 Thread Christopher Fisher
Would using pmap() be suitable for your application? Usually when I use that I get slightly more than a 2X speed up with 4 cores. On Monday, June 20, 2016 at 2:27:41 AM UTC-4, Boylan, Ross wrote: > > I think I've taken steps to minimize parallel overhead by providing only > one function call

[julia-users] Re: Fast vector element-wise multiplication

2016-06-20 Thread chobbes158
I have the same question regarding how to calculate the entry-wise vector product and find this thread. As a novice, I wonder if the following code snippet is still the standard for entry-wise vector multiplication that one should stick to in practice? Thanks! @fastmath @inbounds @simd for

Re: [julia-users] error using getnodecount(m:: Model)

2016-06-20 Thread hililielala16
Thank you, it is done: https://groups.google.com/forum/#!topic/julia-opt/FqzHUwxOFEo Le lundi 20 juin 2016 11:32:08 UTC+2, Mauro a écrit : > > Better post this to the julia-opt mailing list. > > On Mon, 2016-06-20 at 11:27, hilili...@gmail.com wrote: > > Hello, > > > > Does Cbc support the

Re: [julia-users] error using getnodecount(m:: Model)

2016-06-20 Thread Mauro
Better post this to the julia-opt mailing list. On Mon, 2016-06-20 at 11:27, hililielal...@gmail.com wrote: > Hello, > > Does Cbc support the method getnodecount()? > I can use other methods, but when using getnodecount() I get the error: > LoadError: MethodError: 'getnodecount' has no method

[julia-users] error using getnodecount(m:: Model)

2016-06-20 Thread hililielala16
Hello, Does Cbc support the method getnodecount()? I can use other methods, but when using getnodecount() I get the error: LoadError: MethodError: 'getnodecount' has no method mattching getnodecount(:: CbcMathSolverInterface.CbcMathProgModel) So, how can we get the amount of explored nodes

Re: [julia-users] Re: Unexpected error on 1st order ODE using ODE package

2016-06-20 Thread Mauro
On Mon, 2016-06-20 at 10:32, Chris Rackauckas wrote: > I agree rationals don't make sense in most cases (I did it once just for > fun), but how would it work with other defined numbers as they come? Will > the promotions "just work?" No. It is the duty of the type-creator to

[julia-users] Re: Julia users Berlin

2016-06-20 Thread Henri Girard
I am in Angers france (300 kms from paris) 1h30 in TGV. I am starting using ijulia, I use sage. Le mercredi 25 février 2015 14:35:13 UTC+1, David Higgins a écrit : > > Hi all, > > I'm based at the Technical University in Berlin and I've more or less > completed the transition to using Julia

Re: [julia-users] Re: Unexpected error on 1st order ODE using ODE package

2016-06-20 Thread Chris Rackauckas
I agree rationals don't make sense in most cases (I did it once just for fun), but how would it work with other defined numbers as they come? Will the promotions "just work?" But as mentioned, applying f once and using the types from there would catch most cases. On Monday, June 20, 2016 at

Re: [julia-users] A question of style: type constructors vs methods

2016-06-20 Thread Mauro
I think you should use the constructors if the user expects to construct a certain type, e.g. `Dict()`. Conversely if the user cares about the action then use a function, e.g.: julia> keys(Dict()) Base.KeyIterator for a Dict{Any,Any} with 0 entries here I don't care about the type, I just want

Re: [julia-users] Re: Unexpected error on 1st order ODE using ODE package

2016-06-20 Thread Mauro
I'd say this is a bug. `sin(5)` works, so `ode23(f, 0, [0,1])` should work too by promoting `y0=0` and `tspan=[0,1]` to appropriate types. Note that `eltype(tspan)` needs to be promoted to some kind of floating point number; I don't think rationals make sense for differential-equations. I pushed

[julia-users] Re: ComplexPhasePortrait

2016-06-20 Thread Henri Girard
I does works if I uncomment @pyimport scipy Le samedi 18 juin 2016 08:52:03 UTC+2, Henri Girard a écrit : > > HI, > I would like to use complexphaseportrait but I can't find any examples, > somebody can guide me to these ? > Regards > HG >

[julia-users] Re: ComplexPhasePortrait

2016-06-20 Thread Henri Girard
julia> using PyPlot julia> using PyCall julia> @pyimport scipy.integrate as integrate ERROR: PyError (:PyImport_ImportModule) ImportError('No module named scipy.integrate',) [inlined code] from /home/pi/.julia/v0.4/PyCall/src/exception.jl:81 in pyimport at

[julia-users] Re: ComplexPhasePortrait

2016-06-20 Thread Henri Girard
I saw your python version so I might be able to translate my RLC and phase portrait,here it is what I am trying to do : %matplotlib inline import numpy as np import matplotlib.pyplot as plt from scipy.integrate import odeint def f(y,t): if t<25: return [y[1],-8*y[0]+0.1*y[1]]

[julia-users] Re: ComplexPhasePortrait

2016-06-20 Thread Henri Girard
I forget : I tried it in a console and it works but in ijulia I have several problems with pycall, I will try to correct them. Le samedi 18 juin 2016 08:52:03 UTC+2, Henri Girard a écrit : > > HI, > I would like to use complexphaseportrait but I can't find any examples, > somebody can guide me

[julia-users] Re: ComplexPhasePortrait

2016-06-20 Thread Henri Girard
Exactly what I am looking for :) Thanks Il anybody has others examples, i would be very pleased to hear about. Regards HG Le samedi 18 juin 2016 08:52:03 UTC+2, Henri Girard a écrit : > > HI, > I would like to use complexphaseportrait but I can't find any examples, > somebody can guide me to

[julia-users] ANN: Julia 0.4.6 released

2016-06-20 Thread Tony Kelman
Hello all! The latest bugfix release of the Julia 0.4.x line has been released. Apologies for the longer-than-usual delay with this release, there was an issue with code signing of the Windows binaries that took some time to work around. Binaries are available from the usual place