That's it! It should help with translating more things as well. It hadn't
crossed my mind that I could access matplotlib in this manner.
# Julia 0.3.2
# 27.11.2014
using PyPlot
using Dates
# Create Data
dt = Millisecond(100)
time = [DateTime(2014,11,20):dt:DateTime(2014,11,22)]
y =
in the Cython code you turned off bounds checking. This can be done for
Julia with the @inbounds macro. Just use it in your loops like this:
@inbounds for i in whatever
...
end
also @simd may help, sems you can use it in a couple of the innrmost loops.
It sems also simple to parallelize with a
Pileas,
Atom looks very cool, but it appears existing Julia customization is very
minimal. Do you know if there is an easy way to have a command to run the
current file in a julia terminal? (I miiight be tempted into trying to
build it, seeing as the Atom customization stuff looks fun...)
On
Stonebig34,
If all else fails makes me think this is a last resort. Should I be wary?
So, this approach requires WinPython as opposed to the Anaconda install of
IPython I've currently got? (I'm not attached if there aren't any big
downsides; I used Anaconda only because the instructions for
It does have issues. I tracked down a part of the story to
https://github.com/JuliaLang/julia/pull/9086
Den onsdagen den 26:e november 2014 kl. 20:52:57 UTC+1 skrev Stefan
Karpinski:
I wonder if \ might be type unstable.
Moving discussion to the issue you opened.
--Tim
On Wednesday, November 26, 2014 10:39:08 AM Ariel Keselman wrote:
One more issue: The example above can be fixed by reassigning `a` to a new
shared array. But in my case this won't work since I have this array within
a wrapper type... seems
It's the whole global variable thing. Put all this in a function (with
locally-defined T and n_classes), and you won't see any difference.
--Tim
On Wednesday, November 26, 2014 10:28:31 AM Colin Lea wrote:
Thanks to you both! However, there is still another odd issue.
These two functions
I should have read the rest of the thread. By similar timings do you mean
now that they both are fast and neither allocates any significant memory? (This
is how it should be.) If not, you're still using a global variable.
--Tim
On Wednesday, November 26, 2014 01:46:22 PM Colin Lea wrote:
Ah,
When trying to build Cxx.jl I get all sorts of errors.
If there are people on the list which have been using Cxx.jl, I would
appreciate if they would report on their machines and software versions.
My setup is using Linux Mint 17 on an intel 64-bit machine.
I am concerned about:
LLVM version
I could not find it, but apologies if this has previously been discussed.
I am interested in outputting numerical results on the fly - not in
generating movie files. (I have found some nice examples on how to do the
latter.) The following code snippet, run in IJulia opens an external plot
UPDATE: I did find a discussion on this / copied below. So my new question
is:
Can I achieve what I want *without* modifying the pyplot source code?
Thanks,
Christoph
OK This worked (after modifying by hand matplotlib/pyplot.py to change
plt.show(block=False) to plt.ion(), possibly
In my test, I change the code and define Xb::Vector, o::Vector,... etc but
the result doesn't change. Is there some special way to define them?
Regards
Em quarta-feira, 26 de novembro de 2014 17h50min04s UTC-2, Stefan Karpinski
escreveu:
It turns out that doesn't actually matter but there
That is really nice!
But let me alert that, at least in my case (Julia 3.2), I had to add *using
Interact* so that the plot is correctly displayed.
Cheers,
Cristóvão
On Thursday, November 27, 2014 4:59:00 AM UTC, Sheehan Olver wrote:
I figured out an approach that works for animation, thanks
alright!
did the @inbounds and @simd and benchmarked again
(for different light source position, thats why numbers dont match exactly
with the ones above)
cython original code: 27.5 s
julia original code:28.3 s
julia with @inbounds: 21.3 s
julia
with @inbounds @simd: 19.0 s
Looks
Again, let be
addprocs(4)
a=[1,2,3,4]
b=zeros(4)
@parallel for i=1:4
b[i]=a[i]^3
end
b will be not changed (b=[0,0,0,0]).
After running successfully the codes of my initial post, we resume
@parallel for i=1:4
b[i]=a[i]^3
end
Now we obtain the correct results !?!
Hi,
I was able to do it using Interact, Reactive and Winston in IJulia.
For example, in one input cell run
using Interact, Reactive, Winston
p = Input(0.0:0.0)
function f(x)
plot(sin(5*x), sin(2π*x))
xlim(-1, 1)
ylim(-1, 1)
end
lift(f, p)
and then, in another cell, run your
using PyPlot, Interact
f = figure()
@manipulate for p in 1:10
withfig(f) do
...plot commands with parameter p...
end
end
There are some other plotting examples with @manipulate in the Interact docs.
Thank you both for your replies.
Since the purpose is to plot the current state of a numerical simulation
every few iterations (of some nonlinear iteration or time-stepping scheme)
I don't think either these are suitable though.
Re the @manipulate approach: I just get a slider this way?
Before I start putting something crude together myself, I thought I'd ask
here: is there a simple function in Julia that checks monotonicity of
vectors/arrays?
Ideally, I would like a function that takes an Array{Float64},N and checks
monotonicity for each of the N dimensions separately.
Hey everyone,
I've been looking at parallel programming in julia and was getting some
very unexpected results and rather bad performance because of this.
Sadly I ran out of ideas of what could be going on, disproving all ideas I
had. Hence this post :)
I was able to construct a similar
You're right, I had interact as well
Sent from my iPhone
On 27 Nov 2014, at 5:59 am, Cristóvão Duarte Sousa cris...@gmail.com wrote:
That is really nice!
But let me alert that, at least in my case (Julia 3.2), I had to add using
Interact so that the plot is correctly displayed.
Does this work with PyPlot?
Christoph
On Thursday, 27 November 2014 16:05:25 UTC, Sheehan Olver wrote:
You're right, I had interact as well
Sent from my iPhone
On 27 Nov 2014, at 5:59 am, Cristóvão Duarte Sousa cri...@gmail.com
javascript: wrote:
That is really nice!
But let me
julia include(plotnan.jl)
INFO: Loading help data...
/Users/dss/anaconda/lib/python2.7/site-packages/matplotlib/colors.py:583:
RuntimeWarning: invalid value encountered in less
cbook._putmask(xa, xa 0.0, -1)
PyObject matplotlib.collections.PolyCollection object at 0x11993b4d0
This is the
Sorry, forgot the version. That was
matplotlib1.4.0np19py27_0
Hi Adam,
I wrote last resort as I supposed you were relying on Anaconda for other
purposes.
If the only goal for you is to get Ijulia working on windows, this solution
as the advantage of working since a few months.
On Thursday, November 27, 2014 9:58:44 AM UTC+1, Abram Demski wrote:
Hi Abram, (sorry for the keyboard error)
I wrote last resort as I supposed you were relying on Anaconda for other
purposes.
If the only goal for you is to get Ijulia working on windows, this solution
as the advantage of working since a few months.
On Thursday, November 27, 2014 9:59:05 AM
You need to use addprocs before the first @everywhere. I assume you
actually did this, since otherwise you'd have received an error.
It seems that your variable A and v are stored on the master, not on
the workers. Since they are inputs to do_stuff, they need to be copied
there every time. Note
I'm trying to get my head around parallelization in Julia, but nothing
seems to work as I expect. I've read the Parallel Computing part of the
docs quite a few times, but I'm just not able to apply the principles there
to my problem.
As a simple example, consider the following problem: I have
A naive attempt at this failed I just replaced Winston.plot with
PyPlot.plot in Cristovao's example; see below. The result is that Pyplot
plots in the [2] output instead of the [1] output.
Why is it ok with Winston but not with PyPlot?
I am obsessing about PyPlot because I need the 3D plotting
Hi Christoph! Glad to hear that you are jumping on the Julia bandwagon.
In principle it should work with PyPlot, since @manipulate works with PyPlot,
though some setup involving figure() is probably necessary, and I couldn’t
figure it out.
PyPlot is a lot slower than Gadfly
I am using Cxx.jl on Mac OSX 10.9.5 (64 bit).
Cxx requires Julia v0.4.0-dev (i.e., staged functions). I have rebuilt Cxx
many times and the only trouble I encountered was due to not updating Clang in
deps/llvm-svn and related directories.
I think it is best to file an issue in Cxx.jl and
issorted(A) works for vectors. I don't believe there is a version which
exists for arrays with dimension N1.
Cheers,
Kevin
On Thursday, November 27, 2014, Nils Gudat nils.gu...@gmail.com wrote:
Before I start putting something crude together myself, I thought I'd ask
here: is there a
Hey Eric,
The addprocs() is indeed in the wrong place, I must have made a mistake
copy-pasting the example.
The overhead in copying A and v is obviously very naive and suboptimal as I
pointed out. The real implementation I'm focused on is much more efficient
in this regard.
The problem I
I tried after factoring out the cost of sending A and v over, but no dice.
See https://gist.github.com/amitmurthy/3206a4f61cf6cd6000ee
Even with a loop of 4 within do_stuff, same behavior.
I think I found the reason in an old thread -
It seems to me that generalizing the Base.issorted function makes sense. Of
course you need to be able to indicate that you want to check for sorted
columns, rows, etc.
On Thu, Nov 27, 2014 at 12:43 PM, Kevin Squire kevin.squ...@gmail.com
wrote:
issorted(A) works for vectors. I don't believe
As the colonists gave thanks 393 years ago for their one year survival in
the Plymouth Colony, I give thanks to all those Julia Developers who have
created, or are nurturing this wonderful scientific programming language
called - Julia.
Here is a short list of major contributors to the Julia
Hi Sheehan,
Thanks - I did see your post, and that is how I am currently using it. But
I'd prefer to do animations in the notebook if at all possible.
I'm happy to switch to Gadfly for 2D; what do you use for 3D plotting
though?
Christoph
On Thursday, 27 November 2014 17:18:31 UTC,
I use GLPlot.jl for 3D, which is very fast as the update manipulates
the data on the GPU directly, I believe.
It’s a bit finicky to setup and rough around the edges though. I tried
to set it up on another persons computer and it failed.
If you want example usage, see
Hello,
Say I have a parametric type:
type MyType{T}
var1
end
In the most of the case T is a simple integer, and there is no problem with
that. However, sometimes T is an instance of an singleton type, like:
type Joker end
Thus I would like to instantiate
The parameter to MyType{} needs to be a type, but Joker() is an instance.
Just use MyType{Joker}(4)
Cheers
Lex
On Friday, November 28, 2014 9:50:08 AM UTC+10, sebastien.fa...@gmail.com
wrote:
Hello,
Say I have a parametric type:
type MyType{T}
var1
end
In the
I am experimenting a bit with different text editors and IDEs.
So far I have been quite happy with Atom editor, but there you need to
always use the command line to execute the code (I have installed a
`terminal` package that calls the bash quite quickly in Atom).
I was wondering if there is a
I with it had been something more unique...like JuliaL . too many google
hits on julia.
/iaw
On Wednesday, November 26, 2014 6:19:04 AM UTC-8, Neal Becker wrote:
All the good names were taken :)
Pileas wrote:
Is there a specific reason you guys chose this name?
It kinda reminds
I was trying to figure out who is running julia and the website, and
noticed that there is no about us that gives information on who the julia
people are. (it says on the front page that julia is mostly under the MIT
license.) would it make sense for someone to add this information?
I
I have a big list of rectangles I'd like to draw. What I want is to end up
with something that looks like ArrayPlot
http://reference.wolfram.com/language/ref/ArrayPlot.html in Mathematica.
I have it the data the form of an Array{(Int64,Int64),1}, where each entry
is the center of the
Repeating myself, but searching for julialang works well.
Cheers,
Kevin
On Thursday, November 27, 2014, ivo welch ivo...@gmail.com wrote:
I with it had been something more unique...like JuliaL . too many google
hits on julia.
/iaw
On Wednesday, November 26, 2014 6:19:04 AM UTC-8,
Sometimes in ax2+bx+c b is as parameter and can be zero .
Version 0.4.0-dev+1642 (2014-11-17 08:38 UTC)
Commit aa1f53b (10 days old master)
x86_64-w64-mingw32
julia using HDF5
julia f(x) = (3x^2 - 4x + 2); fplot(f, [-5,5])
julia f(x) = (3x^2 - 0x + 2); fplot(f, [-5,5])
(type-error uint8 number
0x is the prefix for hexadecimal numbers, eg 0xff
Since zero times anything is zero, it makes little sense to actually
include such a term so the syntactic ambiguity seems acceptable.
Cheers
Lex
On Friday, November 28, 2014 5:30:25 PM UTC+10, paul analyst wrote:
Sometimes in ax2+bx+c b is
Julia is probably expecting you to give a hex-number (like 0x01). This
collides with the syntactic sugar for multiplication. You can use another
variable name though:
f(y) = 3y^2 - 0y + 2
Best,
Alex.
48 matches
Mail list logo