Re: [julia-users] solving large system of complex nonlinear ODEs

2015-05-07 Thread Andrei Berceanu
ok, so the system under discussion is this one: http://scicomp.stackexchange.com/questions/19585/system-of-coupled-nonlinear-odes-with-complex-coefficients i think the choice basically comes down to either a) an explicit RK method in ODE.jl or b) CVODE(S) in Sundials.jl What do you guys suggest

[julia-users] solving large system of complex nonlinear ODEs

2015-05-06 Thread Andrei Berceanu
Any suggestions for solving a nonlinear system of ~1000 coupled ODEs with complex coefficients?

[julia-users] Re: pre-allocation for sparse matrices

2015-04-13 Thread Andrei Berceanu
Yes but so how do I update it inplace? On Monday, April 13, 2015 at 5:37:50 PM UTC+2, Kristoffer Carlsson wrote: > > If you have the same sparse structures in your matrices then it should be > sufficient to to the IJV -> CSC sparse matrix conversion only once and then > update A in place instead

[julia-users] Re: pre-allocation for sparse matrices

2015-04-13 Thread Andrei Berceanu
OK so I'm not sure how to "directly access the CSC structure". Anyway, for clarity, here is the method which generates my sparse matrix. In a typical usage scenario, I need to generate and diagonalize a lot of these matrices, which are obtained varying the *s* Function. I guess this qualifies as

Re: [julia-users] Re: in-place matrix division

2015-04-13 Thread Andrei Berceanu
455667 >> 0.712479 >> 0.326213 >> >> >> julia> b # For this, b is overwritten >> 3-element Array{Float64,1}: >> 0.455667 >> 0.712479 >> 0.326213 >> >> >> >> >> On Friday, April 10, 2015 at 11:19:45 AM UTC+2, A

Re: [julia-users] code review: my first outer constructor :)

2015-04-13 Thread Andrei Berceanu
s pretty > interesting and certainly has applications in all kids of fields, so it > would be cool if you had some ideas about how to systematically approach > this problem. > > > On Sunday, April 12, 2015 at 10:06:10 PM UTC+2, Andrei Berceanu wrote: >> >> Hi Maur

Re: [julia-users] code review: my first outer constructor :)

2015-04-12 Thread Andrei Berceanu
Hi Mauro, I realised after posting this that I should have been much more specific. I apologise for that! Anyway, thanks for you reply. Not sure what you mean by OO programming, as I thought Julia uses multiple dispatch and not OO. PS: You're the first person I see that also uses runbox, that

[julia-users] Re: smallest eigenvalue of sparse matrix

2015-04-09 Thread Andrei Berceanu
+2, Viral Shah wrote: > > Could you post a self-sufficient code so that the errors can be reproduced? > > -viral > > On Thursday, April 9, 2015 at 11:40:00 PM UTC+5:30, Andrei Berceanu wrote: >> >> I now get >> >> >> >> *CHOLMOD warning: not positiv

[julia-users] Re: smallest eigenvalue of sparse matrix

2015-04-09 Thread Andrei Berceanu
ample if you need the eigenvector(s) as well. > > Best, > > Alex. > > On Thursday, 9 April 2015 19:34:40 UTC+2, Andrei Berceanu wrote: > > How can I get the minimum eigenvalue of a sparse matrix? > > I found eigmin(A), but it only seems to work on dense matrices. &

[julia-users] smallest eigenvalue of sparse matrix

2015-04-09 Thread Andrei Berceanu
How can I get the minimum eigenvalue of a sparse matrix? I found eigmin(A), but it only seems to work on dense matrices. ERROR: `eigmin` has no method matching eigmin(::SparseMatrixCSC{Complex{Float64},Int64})

[julia-users] code review: my first outer constructor :)

2015-04-08 Thread Andrei Berceanu
Hi guys! Here is [part of] some code I recently wrote for solving a physics problem: https://gist.github.com/berceanu/010d331884848205acef It's the first time I try to use Julia constructors properly (or improperly?!) so I need your opinion on a couple of points. 1. On Julia's IRC channel I was

[julia-users] Re: holoviews in julia

2015-04-03 Thread Andrei Berceanu
I just found this as a starting point http://philippjfr.com/blog/interfacing-holoviews-with-julia/ On Saturday, April 4, 2015 at 1:21:00 AM UTC+2, Andrei Berceanu wrote: > > Are you guys familiar with http://ioam.github.io/holoviews ? > Is anyone working on a Julia interface or port? > > //A >

[julia-users] holoviews in julia

2015-04-03 Thread Andrei Berceanu
Are you guys familiar with http://ioam.github.io/holoviews ? Is anyone working on a Julia interface or port? //A

[julia-users] Re: debugging "Kernel died" in IJulia

2015-03-27 Thread Andrei Berceanu
So where am I supposed to see the extra debugging info? I still get the same "Kerned died" message window. On Friday, March 27, 2015 at 6:06:29 AM UTC+1, Daniel Høegh wrote: > > This looks like issue: https://github.com/JuliaLang/IJulia.jl/issues/286

[julia-users] default value for slider in Interact.js

2015-03-27 Thread Andrei Berceanu
Is there any way of setting a default value for a slider object, different from the middle of the slider interval (which is automatically chosen)? I am refering to, i.e. *using Reactive, Interacta = slider(1:10)* *--> *this will have a default value of 5.

[julia-users] debugging "Kernel died" in IJulia

2015-03-26 Thread Andrei Berceanu
I seem to be getting this message, with no other error, quite often when evaluating my notebook. What is the recommended way of debugging such a thing? Since no extra information is provided I have no idea what is causing it in my code, or even if its an IJulia problem. //A

Re: [julia-users] strange behaviour of togglebuttons in Interact.jl

2015-03-26 Thread Andrei Berceanu
lection to change wrt another signal, you will need to > lift the togglebuttons and set the value_label, but the value in the input > won't change without user interaction... > > I may not have understood your question fully well. I hope you can play > around with value_label and

Re: [julia-users] strange behaviour of togglebuttons in Interact.jl

2015-03-24 Thread Andrei Berceanu
, if you are passing in your own input signal to widgets, you > need to take care of maintaining the right initial values. It's also better > to use OrderedDict from DataStructures package here to keep the ordering of > the key-value pairs. > > > &

[julia-users] strange behaviour of togglebuttons in Interact.jl

2015-03-24 Thread Andrei Berceanu
Consider the following code *using Reactive, Interactα = Input(0)togglebuttons(["one" => 1, "two" => 2], signal=α)signal(α)*I would expect the value of *α *to change after executing the *togglebuttons*(..) line, however this is not the case. *signal(α) *on the next line shows that *α *is st

[julia-users] metaprogramming for modifying expression inside anonymous function?

2015-03-24 Thread Andrei Berceanu
Hi guys, Say I have a tuple of anonymous functions, such as: *foolist = ((x,y)-> exp(x*y), (x,y)-> sin(x+y))* and would like to (programatically) produce another tuple where every function has its overall sign changed. In my example this would be *newfoolist = ((x,y)-> -exp(x*y), (x,y)-> -si

[julia-users] shorten redundant code

2015-03-23 Thread Andrei Berceanu
Hi, I need some help shortening this fragment of Julia code https://gist.github.com/berceanu/e4fdfa6285d30c024a71 The main idea is that *ft* and *ftex* are both tuples containing 4 anonymous functions. The are initialized as the identical function, but then depending on the toggle buttons, can

[julia-users] gadfly plot of array with single nonzero element

2015-03-18 Thread Andrei Berceanu
Trying to plot a Matrix with a single nonzero element in Gadfly using *using Gadflya = zeros(Float64, 10,10);a[5,5] = 1;spy(a)* The result is shown in the attached figure. How can I convince Gadfly to show me also the zero values, in order to see the whole array, not just one element? To se

Re: [julia-users] Re: using Gadfly and PyPlot at the same time

2015-03-06 Thread Andrei Berceanu
anytime you need Gadfly's plot. > > You can find more info here: > http://docs.julialang.org/en/release-0.3/manual/modules/#summary-of-module-usage > > > > > Am 06.03.2015 um 14:12 schrieb Andreas Lobinger >: > > > Hello colleague, > > > >

[julia-users] using Gadfly and PyPlot at the same time

2015-03-06 Thread Andrei Berceanu
Hi guys, when I do using Gadfly, PyPlot i get Warning: using PyPlot.plot in module Main conflicts with an existing identifier. And other warning of the same type. How can I solve this?

Re: [julia-users] nonlinear curve fitting

2015-03-03 Thread Andrei Berceanu
at 11:11:26 PM UTC+1, René Donner wrote: > > Can you post the code you are trying to run? Which Julia version are you > on? > > The example given on https://github.com/JuliaOpt/LsqFit.jl works fine > here on 0.3.6. > > > > Am 03.03.2015 um 22:55 schrieb Andrei Bercea

Re: [julia-users] nonlinear curve fitting

2015-03-03 Thread Andrei Berceanu
i now get `start` has no method matching start(::LsqFitResult{Float64}) On Tuesday, March 3, 2015 at 10:41:11 PM UTC+1, René Donner wrote: > > Looks like curve_fit has been moved to > https://github.com/JuliaOpt/LsqFit.jl > > > Am 03.03.2015 um 22:30 schrieb Andrei Ber

[julia-users] nonlinear curve fitting

2015-03-03 Thread Andrei Berceanu
i found this post concerning nonlinear curve fitting in Julia, http://www.walkingrandomly.com/?p=5181 but it appears the curve_fit method no longer exists does anyone have an updated version?

[julia-users] 3D interactive plots in IJulia

2015-03-03 Thread Andrei Berceanu
Is there some Julia library that allows one to do create 3D (surface plots) in the IJulia notebook and then rotate them interactively, using the mouse? //A

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

2015-03-03 Thread Andrei Berceanu
> for x in linspace(0.0,2π,N), y in linspace(0.0,2π,N) > push!(X, x) > push!(Y, y) > push!(Z, sin(x)*sin(y)) > end > plot(x=X,y=Y,color=Z,Geom.rectbin) > > > > On Friday, February 6, 2015 at 5:34:45 PM UTC-5, Andrei Berceanu wrote: >> >>

[julia-users] Gadfly legend for different layers

2015-02-27 Thread Andrei Berceanu
I have a 2D plot of 2 layers with different colors: *using Gadflyplot(layer(x=1:10, y=rand(10), Geom.line, Geom.point, Theme(default_color=color("red"))), layer(x=1:10, y=rand(10), Geom.line, Geom.point, Theme(default_color=color("green"*How can I generate a legend which specifies

[julia-users] latex axis labels in Gadfly

2015-02-27 Thread Andrei Berceanu
I am trying to get rendering of LaTeX expressions in Gadfly axes labels, with *using Gadflyplot(x=1:10, y=rand(10), Geom.line, Geom.point, Guide.xlabel("$c^2$"), Guide.ylabel("E"))* however this does not seem to work. Does anyone know how to do it? //A

[julia-users] Re: change size of individual plot in gadfly under IJulia

2015-02-12 Thread Andrei Berceanu
e: > > draw(SVG(20cm, 10cm), plot(...)) > > > On Wednesday, February 11, 2015 at 3:42:47 PM UTC-8, Andrei Berceanu wrote: >> >> set_default_plot_size changes the default size of all following plots, >> but how can i set the size of a certain plot individually? >> >> //A >> >

[julia-users] drawing geometrical shapes on top of gadfly plot

2015-02-12 Thread Andrei Berceanu
Does anyone know how I could draw a circle/square of a given radius/size on top of a Gadfly plot? Can I do it directly from within the plot command, or do I need to compose the figure after plotting it? I am using IJulia so im guessing its using svgs via the D3 backend (i do not explicitly call

[julia-users] change size of individual plot in gadfly under IJulia

2015-02-11 Thread Andrei Berceanu
set_default_plot_size changes the default size of all following plots, but how can i set the size of a certain plot individually? //A

[julia-users] way around passing functions as arguments

2015-02-11 Thread Andrei Berceanu
I have written the following function for generating a sparse matrix: *function genspmat(ω0::Float64; N=pm["N"], α=pm["α"], γ=pm["γ"], κ=pm["κ"])# Determine memory usagenz = countnonzeros(; N=N)# Prea

[julia-users] 2D plot in gadfly

2015-02-06 Thread Andrei Berceanu
The only thing keeping me from migrating from PyPlot to Gadfly is the lack of 2D plotting abilities. To exemplify, I used the following code to generate the attached image with PyPlot (here data is a 2d array): *fig, ax = plt.subplots(figsize=(4, 4))img = ax[:imshow](data, orig

[julia-users] Re: building GUI on top of julia code

2015-02-06 Thread Andrei Berceanu
would be appreciated, I imagine. > > Julia does have bindings to GTK and TK. Depending on your familiarity with > these frameworks, they may work for you. > > Regards > - > Avik > > On Friday, 6 February 2015 18:40:46 UTC, Andrei Berceanu wrote: >> >> So I hav

[julia-users] building GUI on top of julia code

2015-02-06 Thread Andrei Berceanu
So I have wrote the code for a numerical simulation in Julia, and I have a few free parameters that I can play with (5-6) which will change the resulting plots. The plots are done using Matplotlib via PyPlot. I would like to build a simple GUI with a few sliders for my parameters and an array o

Re: [julia-users] Re: compute quantity along contour

2015-02-04 Thread Andrei Berceanu
I'm thinking, given that the phase map was produced by applying Base.angle() on another (complex) matrix (say we call it M), it is this function which caused the phase wrapping in the first place, right? So can't I somehow get around the problem and produce the unwrapped map directly from M? O

Re: [julia-users] Re: compute quantity along contour

2015-02-04 Thread Andrei Berceanu
I'm hoping it wouldn't, but it is actually one of the things I would like to test. On Wednesday, February 4, 2015 at 3:17:39 PM UTC+1, Michele Zaffalon wrote: > > Wouldn't the answer depend on the path you choose? > > On Wed, Feb 4, 2015 at 3:04 PM, Andrei Berceanu

[julia-users] Re: compute quantity along contour

2015-02-04 Thread Andrei Berceanu
I guess what I'm trying to say is that your answer makes sense for continuous functions, while mine has jumps of 2\pi, and so the phase change is equal to the total number of these jumps (times 2\pi). Does this make sense? On Wednesday, February 4, 2015 at 11:36:51 AM UTC+1, Andrei Ber

[julia-users] Re: compute quantity along contour

2015-02-04 Thread Andrei Berceanu
; On Tuesday, February 3, 2015 at 1:17:15 PM UTC-5, Andrei Berceanu wrote: > >> How can I numerically compute the total change in phase as one goes >> around a closed loop centered on the site $m=n=0$? >> > > Seems like > > totalchangeinphase(m,n) = 0 > > wo

[julia-users] compute quantity along contour

2015-02-03 Thread Andrei Berceanu
I would like to use Julia to solve the following problem, any suggestions are welcome :) The attached image (obtained in Julia) represents the phase of a wavefunction (in radians) on a square lattice, where m and n label the lattice sites. Computationally speaking, it is the density plot of a 4

Re: [julia-users] Re: compute hermite polynomials

2015-02-02 Thread Andrei Berceanu
icient of the leading order term, not the > value of the polynomial. > > Thanks, > > Jiahao Chen > Staff Research Scientist > MIT Computer Science and Artificial Intelligence Laboratory > > On Mon, Feb 2, 2015 at 11:43 AM, Andrei Berceanu > wro

[julia-users] Re: compute hermite polynomials

2015-02-02 Thread Andrei Berceanu
:24:21 PM UTC+1, Andrei Berceanu wrote: > > Andras, no worries :) Now I understand why I couldn't find the polynomials > in your gist! > > //A > > On Monday, February 2, 2015 at 5:19:49 PM UTC+1, Andras Niedermayer wrote: >> >> Sorry, I meant Cubic Hermite I

[julia-users] Re: compute hermite polynomials

2015-02-02 Thread Andrei Berceanu
ly used it with the output of the ODE.jl. >> >> I hope this is a useful starting point... >> >> Best, >> Andras >> >> On Monday, February 2, 2015 at 4:38:57 PM UTC+1, Andrei Berceanu wrote: >>> >>> Yes, exactly, in order to generate plots li

[julia-users] Re: compute hermite polynomials

2015-02-02 Thread Andrei Berceanu
s is a useful starting point... > > Best, > Andras > > On Monday, February 2, 2015 at 4:38:57 PM UTC+1, Andrei Berceanu wrote: >> >> Yes, exactly, in order to generate plots like >> http://en.wikipedia.org/wiki/Hermite_polynomials#mediaviewer/File:Hermite_poly_phys.svg >

[julia-users] Re: compute hermite polynomials

2015-02-02 Thread Andrei Berceanu
Yes, exactly, in order to generate plots like http://en.wikipedia.org/wiki/Hermite_polynomials#mediaviewer/File:Hermite_poly_phys.svg //A On Monday, February 2, 2015 at 4:36:55 PM UTC+1, Jiahao Chen wrote: > > > > Is there an easy way to compute Hn(x)? > > Do you mean to evaluate a given Hermit

[julia-users] compute hermite polynomials

2015-02-02 Thread Andrei Berceanu
Hi, Are Hermite polynomials (http://en.wikipedia.org/wiki/Hermite_polynomials) implemented in Julia? Is there an easy way to compute Hn(x)? //A

Re: [julia-users] eigenvalues of sparse matrix

2015-01-26 Thread Andrei Berceanu
ble to get closer to what you want by using shifts in eigs. > Then you'll get the values closest to the value of the shift. > > 2015-01-26 11:41 GMT-05:00 Andrei Berceanu >: > >> Indeed it seems to work with complex matrices as well. What would be very >> useful

Re: [julia-users] eigenvalues of sparse matrix

2015-01-26 Thread Andrei Berceanu
Also, does eigs return the corresponding eigenvectors as well? //A On Monday, January 26, 2015 at 5:41:44 PM UTC+1, Andrei Berceanu wrote: > > Indeed it seems to work with complex matrices as well. What would be very > useful for me is the ability to get eigenvalues within a certain

Re: [julia-users] eigenvalues of sparse matrix

2015-01-26 Thread Andrei Berceanu
t; > should give you the largest (in magnitude) values. > > I think the documentation is simply wrong when stating that the matrix has > to be real. I just tried a complex matrix and it worked just fine, so > please open an issue about the documentation. > > 2015-01-26 10:03 GMT-05:

Re: [julia-users] eigenvalues of sparse matrix

2015-01-26 Thread Andrei Berceanu
Besides, the help of eigs says "using Lanczos or Arnoldi iterations for real symmetric or general nonsymmetric matrices respectively". Mine is hermitian, i.e. complex and symmetric. On Monday, January 26, 2015 at 4:02:16 PM UTC+1, Andrei Berceanu wrote: > > That seems to return

Re: [julia-users] eigenvalues of sparse matrix

2015-01-26 Thread Andrei Berceanu
e > them. > > 2015-01-26 9:40 GMT-05:00 Andrei Berceanu >: > >> Is there any Julia function for computing the eigenvalues of a large, >> sparse, hermitian matrix M? I have tried eig(M) and eigvals(M) and got the >> "no method" error. >> >> //A >> > >

[julia-users] eigenvalues of sparse matrix

2015-01-26 Thread Andrei Berceanu
Is there any Julia function for computing the eigenvalues of a large, sparse, hermitian matrix M? I have tried eig(M) and eigvals(M) and got the "no method" error. //A

Re: [julia-users] Re: package proposal

2014-12-29 Thread Andrei Berceanu
suitable version of the gnu-ada compiler from http://libre.adacore.com. See details at https://github.com/janverschelde/PHCpack/issues/3. On 12/27/2014 01:11 AM, Evan Pu wrote: is this thread still alive? a phc package would be good... On Monday, June 23, 2014 5:26:34 AM UTC-7, Andrei Berceanu

Re: [julia-users] obscure error in Julia 0.3.3

2014-12-22 Thread Andrei Berceanu
>> > Andrei we probably have to build other >> > parts that interact with suitesparse >> > from source ins

Re: [julia-users] obscure error in Julia 0.3.3

2014-12-16 Thread Andrei Berceanu
at the Julia package was build with USE_SYSTEM_SUITESPARSE=0 > > I am currently building the Julia from the PKGBUILD in order to confirm > that these build-options lead to the problem. > > Best, > Valentin > > On Tuesday, 16 December 2014 11:59:51 UTC+1, Andrei Berceanu wrote:

Re: [julia-users] obscure error in Julia 0.3.3

2014-12-16 Thread Andrei Berceanu
output in REPL (followed by a crash), in IJulia I simply get a popup saying the kernel died. On Tuesday, December 16, 2014 10:34:27 AM UTC+1, Andrei Berceanu wrote: > > Ok, so here is the output from versioninfo() from inside the Julia REPL: > > > > > > > > > > *Jul

Re: [julia-users] obscure error in Julia 0.3.3

2014-12-16 Thread Andrei Berceanu
wrote: >> >> A fellow archuser here. Under which circumstances does the error occur? >> Eg. what code are you executing? >> >> And what does >> pacman -Qi julia blas lapack >> output> >> >> On Monday, 15 December 2014 19:14:22 UTC+1, And

[julia-users] obscure error in Julia 0.3.3

2014-12-15 Thread Andrei Berceanu
Hi all, I recently upgraded to Julia Version 0.3.3 on my Arch Linux box and sometimes get this strange error, followed by a kernel crash - what gives? julia: symbol lookup error: /usr/bin/../lib/julia/libcholmod.so: undefined symbol: zpotrf_ //A

Re: [julia-users] julia emacs support

2014-10-19 Thread Andrei Berceanu
option if you are comfortable with it. > > Best, > > Tamas > > On Sun, Oct 12 2014, Andrei Berceanu > > wrote: > > > I was wondering what the status of Julia support in Emacs is. I assume > it > > can do syntax highlighting, but can it > > >

[julia-users] Re: Interact.jl + matplotlib, refresh only part of figure

2014-10-18 Thread Andrei Berceanu
Ok, thanks a lot! :) On Saturday, October 18, 2014 9:31:02 PM UTC+2, Steven G. Johnson wrote: > > In order to display something in IJulia, you don't have much choice but to > redraw the whole figure I think, since it needs to render a new PNG image > and send it to the front-end. > > On the oth

[julia-users] julia emacs support

2014-10-12 Thread Andrei Berceanu
I was wondering what the status of Julia support in Emacs is. I assume it can do syntax highlighting, but can it 1. connect and send code to the REPL and/or IJulia 2. jump to a specific function definition (like, for instance, Juno, the LightTable plugin) 3. autocomplete code and 4. show help fo

[julia-users] Interact.jl + matplotlib, refresh only part of figure

2014-10-09 Thread Andrei Berceanu
I would like to have a slider controlling a vertical bar on my plot. Changing the value of the slider should only move the bar, not replot the whole figure. So far I have come up with this code *using Reactive, Interactusing PyPlotf = figure();x = linspace(0,10,1000)vertval=s

Re: [julia-users] multiple functions sharing common keywords

2014-10-09 Thread Andrei Berceanu
Done. See https://github.com/JuliaLang/julia/issues/8643 On Thursday, October 9, 2014 10:11:40 PM UTC+2, Stefan Karpinski wrote: > > Sure. It will serve as a good place for discussion of ideas. > > On Thu, Oct 9, 2014 at 4:09 PM, Andrei Berceanu > wrote: > >> Ah ok, I

Re: [julia-users] multiple functions sharing common keywords

2014-10-09 Thread Andrei Berceanu
> On Thu, Oct 9, 2014 at 4:02 PM, Andrei Berceanu > wrote: > >> Tim, what do you mean by "people have moved away from it now that we have >> keywords"? In my example I do use keywords (in fact that is the only thing >> I use), notice the ";" a

Re: [julia-users] multiple functions sharing common keywords

2014-10-09 Thread Andrei Berceanu
; > Yes, this is a major problem, but I'm not sure what the fix is. It's a > > serious language design issue and I'm not aware of any languages that > have > > good solutions. > > > > On Thu, Oct 9, 2014 at 3:09 PM, Andrei Berceanu > &

[julia-users] multiple functions sharing common keywords

2014-10-09 Thread Andrei Berceanu
I often find myself passing long lists of parameters from one function to another. A simple, contrived example would be the following *function fun3(; kw1 = 1, kw2 = 2, kw5 = 8, kw6 = 4)fun2(; kw1 = kw1, kw2 = kw2)endfunction fun2(; kw1 = 1, kw2 = 2)fun1(; kw1 = kw1, kw2 = kw2

[julia-users] Re: help with generation of sparse matrix

2014-10-07 Thread Andrei Berceanu
05 AM UTC-4, Iain Dunning wrote: >> >> At a glance, why build list only to just add it to J? Why not add it >> directly to J, and add i to I. >> >> If I have a chance I'll look further. >> >> Which Julia? >> >> On Monday, October 6, 201

[julia-users] help with generation of sparse matrix

2014-10-06 Thread Andrei Berceanu
I have written the following Julia code to build a sparse matrix of dimension N^2xN^2 https://gist.github.com/berceanu/fe7e26840637517383d8 The code works (probably in a very suboptimal way) for small enough matrices, but for example if I set N=1000, genspmat(1000) quickly eats up my RAM and c

[julia-users] Re: Autoreload usage

2014-10-04 Thread Andrei Berceanu
I see that MyModule.x() does work, but since I exported the x function in MyModule, I expected x() to just work. Besides, writing MyModule.stuff everytime is quite cumbersome. //A On Saturday, October 4, 2014 7:55:40 PM UTC+2, Andrei Berceanu wrote: > > I created a file called MyModule.j

[julia-users] Autoreload usage

2014-10-04 Thread Andrei Berceanu
I created a file called MyModule.jl with the following content module MyModule export x, y x() = "x" y() = "y" p() = "p" end from the REPL, i can do using MyModule x() --> "x" Now I would like to use the Autoreload package for easy hacking on my fancy new module. So in the REPL I do using A

Re: [julia-users] external editor from IJulia

2014-10-01 Thread Andrei Berceanu
seems that you should set JULIA_EDITOR. It might be that your VISUAL > variable is still set to Vim. > > V > > On Wednesday, 1 October 2014 15:24:30 UTC+2, Andrei Berceanu wrote: >> >> I changed the EDITOR environment variable in my profile, and now IJulia >> returns &

Re: [julia-users] external editor from IJulia

2014-10-01 Thread Andrei Berceanu
2014 3:00:27 PM UTC+2, Isaiah wrote: > > try changing your EDITOR variable to something that starts own window / > can run outside of terminal. > On Sep 29, 2014 6:08 PM, "Andrei Berceanu" > wrote: > >> Is there a way to open an external text editor (say gvim) f

[julia-users] external editor from IJulia

2014-09-29 Thread Andrei Berceanu
Is there a way to open an external text editor (say gvim) from within IJulia? More specifically, I would like to be able to edit the definition of a function. In the REPL I can use @edit fun() and this opens the module where fun() is defined at the specific line. However in IJulia I get @edit

Re: [julia-users] Interact + PyPlot: only update when releasing slider

2014-09-09 Thread Andrei Berceanu
IPython doesn't do update on release, Interact, in fact, uses the same >> widgets. What it does do is have at most 4 updates at any given time in the >> processing pipeline (any more updates replace the last update in the queue). >> >> On Mon, Sep 8, 2014 at 8:45 PM, And

[julia-users] Re: multi-panel interactive figure with PyPlot

2014-09-09 Thread Andrei Berceanu
I just submitted https://github.com/stevengj/PyPlot.jl/issues/84. //A On Monday, September 8, 2014 1:31:21 PM UTC+2, Andrei Berceanu wrote: > > I'm trying to create a two-panel interactive figure using Interact.jl and > PyPlot.jl. Based on the example notebooks from Interact.jl,

Re: [julia-users] Interact + PyPlot: only update when releasing slider

2014-09-08 Thread Andrei Berceanu
. On Monday, September 8, 2014 4:10:05 PM UTC+2, John Myles White wrote: > > I suspect the only way to do this is to change Interact so that it exposes > a minimum time threshold before it registers a state change. > > — John > > On Sep 8, 2014, at 4:16 AM, Andrei Berceanu &

[julia-users] multi-panel interactive figure with PyPlot

2014-09-08 Thread Andrei Berceanu
I'm trying to create a two-panel interactive figure using Interact.jl and PyPlot.jl. Based on the example notebooks from Interact.jl, I came up with the following: using Reactive, Interact using PyPlot x = linspace(0,2π,1000); f, axes = plt.subplots(1,2, figsize=(4, 4)) @manipulate for α=1:0.1:

[julia-users] Interact + PyPlot: only update when releasing slider

2014-09-08 Thread Andrei Berceanu
I have some code along the lines of f = figure() @manipulate for α=1:0.1:3, β=1:0.1:3, γ=1:0.1:3; withfig(f) do y = fun(α,β,γ) PyPlot.plot(x, y) end end where fun is a *very slow* function to evaluate. Is there any way to tell @manipulate to update the resulting plot only aft

[julia-users] Re: Kronecker Delta functions and block matrices

2014-08-30 Thread Andrei Berceanu
On a more general note, I am thinking that with a bit of cleanup, this code could make a good Julia metaprogramming example, especially since I haven't seen many of those around :) //A On Saturday, August 30, 2014 10:52:49 AM UTC+2, Andrei Berceanu wrote: > > This is what I came

[julia-users] Re: Kronecker Delta functions and block matrices

2014-08-30 Thread Andrei Berceanu
This is what I came up with for the full matrix calculation: https://github.com/berceanu/notebooks/blob/master/julia/macros.ipynb I now have a macro for the elements of M, another for the elements of Q and yet another for the elements of L. In the end I define the genmatL function which loops o

[julia-users] Re: Kronecker Delta functions and block matrices

2014-08-29 Thread Andrei Berceanu
August 28, 2014 10:42:29 PM UTC+2, Steven G. Johnson wrote: > > On Thursday, August 28, 2014 6:36:16 AM UTC-4, Andrei Berceanu wrote: >> >> Steven, could you detail your macro proposal please? What exactly do you >> have in mind? >> > > e.g. you could have a mac

[julia-users] Re: Kronecker Delta functions and block matrices

2014-08-28 Thread Andrei Berceanu
Steven, could you detail your macro proposal please? What exactly do you have in mind? On Thursday, August 28, 2014 12:18:54 PM UTC+2, Tomas Lycken wrote: > > Maybe https://github.com/Jutho/TensorOperations.jl can be helpful here? > I've never used it myself, but just by the name and the descrip

[julia-users] Kronecker Delta functions and block matrices

2014-08-28 Thread Andrei Berceanu
Hi guys, I am trying to programatically generate a Julia function that calculates a 6x6 matrix. I have written a short LaTeX description of the problem at: http://nbviewer.ipython.org/github/berceanu/notebooks/blob/master/OPODrag/block_matrix.ipynb The basic idea is, I have an analytical expres

Re: [julia-users] array doubling

2014-07-29 Thread Andrei Berceanu
x it? >> >> — John >> >> On Jul 29, 2014, at 7:23 AM, Andrei Berceanu >> wrote: >> >> nice, ty! >> btw, the manual at >> http://julia.readthedocs.org/en/latest/stdlib/linalg/#Base.repeat says >> repeat(*A*, *inner = Int*, []*outer = Int*

Re: [julia-users] array doubling

2014-07-29 Thread Andrei Berceanu
14 4:06:22 PM UTC+2, John Myles White wrote: > > repeat([1, 2, 3], inner = [2]) > > On Jul 29, 2014, at 7:03 AM, Andrei Berceanu > wrote: > > > Whats the easiest way of going from an array > > [1,2,3] -> [1,1,2,2,3,3] > > i.e. repeating all elements 2 (or more generally, n) times? > > > > A > >

[julia-users] array doubling

2014-07-29 Thread Andrei Berceanu
Whats the easiest way of going from an array [1,2,3] -> [1,1,2,2,3,3] i.e. repeating all elements 2 (or more generally, n) times? A

Re: [julia-users] numpy equivalent functionality

2014-07-23 Thread Andrei Berceanu
Thanks guys, works like a charm! A On Wednesday, July 23, 2014 4:32:56 PM UTC+2, Tim Holy wrote: > > A[end:-1:1, ...] > > On Wednesday, July 23, 2014 07:07:20 AM Andrei Berceanu wrote: > > Hi guys, > > > > I have 2 short numpy-related questions. > >

[julia-users] numpy equivalent functionality

2014-07-23 Thread Andrei Berceanu
Hi guys, I have 2 short numpy-related questions. In numpy, if one can invert an arbitrary array *arr* along a given axis using the syntax *arr[::-1,...]* What is the equivalent idiom in Julia? The other issue is, how can I truncate an array between a lower and upper bound? In numpy, thi

[julia-users] what is the recommended way of including images in an IJulia notebook?

2014-07-20 Thread Andrei Berceanu
Hi guys, I would like to include a couple of .png images in a notebook with IJulia - what is the simplest way of doing that? On one hand there is the ImageView package, but that seems to be geared towards the terminal? Perhaps I can include them directly in a markdown cell? ty, A

Re: [julia-users] Re: reading data file using fortran's D scientific notation

2014-07-18 Thread Andrei Berceanu
at64,2}: > -70.0 -70.0 3.0982e-10 > -69.4531 -70.0 2.54816e-10 > -68.9063 -70.0 2.23406e-10 > > julia> readdlm("fl", Float64) > 3x3 Array{Float64,2}: > -70.0 -70.0 3.0982e-10 > -69.4531 -70.0 2.54816e-10 > -68.9063 -70.0 2.2340

Re: [julia-users] Re: reading data file using fortran's D scientific notation

2014-07-18 Thread Andrei Berceanu
Here are a few lines from one of my files, after sed preprocessing: -70.0 -70.0 3.098203380460164E-010 -69.453125000 -70.0 2.548160684589544E-010 -68.90625 -70.0 2.234061987906998E-010 There are

Re: [julia-users] Re: reading data file using fortran's D scientific notation

2014-07-18 Thread Andrei Berceanu
Here is 1 line from one of my files, after sed-magic: -70.0 -70.0 3.098203380460164E-010 -69.453125000 -70.0 2.548160684589544E-010 -68.90625 -70.0 2.234061987906998E-010 There are 2 spaces at th

[julia-users] Re: reading data file using fortran's D scientific notation

2014-07-18 Thread Andrei Berceanu
file with the string “.copy” > appended to the name, and then replaces all occurences of D with E (or e, > or whatever you need) using sed. > > // T > On Friday, July 18, 2014 12:51:32 PM UTC+2, Andrei Berceanu wrote: > > I would prefer to keep my original files

[julia-users] Re: reading data file using fortran's D scientific notation

2014-07-18 Thread Andrei Berceanu
M UTC+2, Ivar Nesje wrote: > > If you have a reasonable editor, you should be able to open all your files > and issue a global search and replace operation that changes D to E. If you > have many files you can use sed to automate the process. > > kl. 11:41:12 UTC+2 fredag 1

[julia-users] Re: finding all roots of complex function

2014-07-18 Thread Andrei Berceanu
le, wheres mine are 2-variable functions. On Thursday, July 17, 2014 7:53:38 PM UTC+2, Steven G. Johnson wrote: > > > > On Thursday, July 17, 2014 9:19:04 AM UTC-4, Andrei Berceanu wrote: >> >> I should perhaps mention that this is part of a bigger scheme, to first >>

[julia-users] reading data file using fortran's D scientific notation

2014-07-18 Thread Andrei Berceanu
Hi all, I have a lot of datafiles containing numbers in Fortran's double precision notation (http://math.hawaii.edu/wordpress/fortran-3/#double), i.e. 1.23D-3, instead of the usual E scientific notation. Is there a simple way to import the data as Float64? Tnx! Andrei

[julia-users] Re: finding all roots of complex function

2014-07-17 Thread Andrei Berceanu
I should perhaps mention that this is part of a bigger scheme, to first find all the poles of G(x,y)/F(x,y) and then use the residue theorem for solving a complex integral of the type integral( G(x,y)/F(x,y), (x,y)) On Thursday, July 17, 2014 3:15:45 PM UTC+2, Andrei Berceanu wrote: > &

  1   2   >