There is isdefined , which may be what you need.
http://julia.readthedocs.org/en/latest/stdlib/base/?highlight=isdefined#Base.isdefined
eg: isdefined(Main, :x)
On Wednesday, 16 April 2014 06:40:27 UTC+1, Peter wrote:
Is there an equivalent for the Matlab function exist() which checks for
Le mercredi 16 avril 2014 05:49:44 UTC+2, gdeloscampos a écrit :
Hello, I am wondering if anyone can point me to documentation about
opening, reading and writing to connections?
IO = open(temp, a) # a stands for append
write(IO, string1\n)
write(IO, string2\n)
close(IO)
Another
Le mercredi 16 avril 2014 08:49:53 UTC+2, harven a écrit :
Le mercredi 16 avril 2014 05:49:44 UTC+2, gdeloscampos a écrit :
Hello, I am wondering if anyone can point me to documentation about
opening, reading and writing to connections?
It seems that file interaction is not really
Is there a faster way of doing this?
Dstr2 = Array(Float64,length(Dstc[time])-1,2) # Preallocate averaged Dstr
array
for i=1:1:length(Dstc[time]) - 1
f = find(Dstc[time][i] .= Dstr[time] . Dstc[time][i+1])
dN = Dstr[NH3][f]
Dstr2[i,1] = f[1]
Dstr2[i,2] = mean(dN)
end
Dstr and
Le mercredi 16 avril 2014 00:09:14 UTC+2, Matt Bauman a écrit :
In Julia 0.2, readlines returned an Array with Any elements. In recent
versions, that's been sharpened to an Array with ASCII- and UTF8Strings.
Thanks for the answer. So apparently utf16 is not supported anymore?
From what
Le mercredi 16 avril 2014 11:08:31 UTC+2, RecentConvert a écrit :
Is there a faster way of doing this?
Dstr2 = Array(Float64,length(Dstc[time])-1,2) # Preallocate averaged
Dstr array
for i=1:1:length(Dstc[time]) - 1
f = find(Dstc[time][i] .= Dstr[time] . Dstc[time][i+1])
dN =
The logical indexing version of that would be
f = Dstc[time][i] .= Dstr[time] . Dstc[time][i+1]
dN = Dstr[NH3][f]
In other words dropping the find and using a boolean array (BitArray) to
do the indexing. In Matlab this is usually faster, not sure whether the
same speed comparison translates to
Use the profiler to find out what the bottlenecks are. But just looking at the
code reveals some possible candidates:
- You repeatedly call Dstr[time], Dstc[time], and Dstr[NH3]. Consider
assigning them to a variable at the beginning of the loop.
- Your code allocates memory on each iteration.
I'm trying to push a new package to METADATA, but I'm having some trouble.
I've run
julia Pkg.tag(KDE)
INFO: Tagging KDE v0.0.1
which tags the KDE repo, but doesn't make any changes to METADATA repo.
What am I missing? (I'm running the julia nightly)
simon
What does Pkg.publish() show?
On Wed, Apr 16, 2014 at 4:17 PM, Simon Byrne simonby...@gmail.com wrote:
I'm trying to push a new package to METADATA, but I'm having some trouble.
I've run
julia Pkg.tag(KDE)
INFO: Tagging KDE v0.0.1
which tags the KDE repo, but doesn't make any changes
Hmm, something's not right here:
julia Pkg.update()
INFO: Updating METADATA...
INFO: INFO: INFO: INFO: Updating GSLDists...Updating BoostDists...Updating
RmathDist...Updating KDE...
INFO: Computing changes...
INFO: No packages to install, update or remove
julia Pkg.publish()
ERROR:
My bad. I manually updated METADATA for HTTPClient package and may have
screwed up. Give me a minute.
On Wed, Apr 16, 2014 at 4:29 PM, Simon Byrne simonby...@gmail.com wrote:
Hmm, something's not right here:
julia Pkg.update()
INFO: Updating METADATA...
INFO: INFO: INFO: INFO: Updating
Sorry, couldn't find anything wrong with my edits. I don't see the error
you are seeing on my machine though.
On Wed, Apr 16, 2014 at 4:43 PM, Amit Murthy amit.mur...@gmail.com wrote:
My bad. I manually updated METADATA for HTTPClient package and may have
screwed up. Give me a minute.
On
Hmm, I tried deleting my whole .julia and I still get the same message.
I'll file an issue.
On Wednesday, 16 April 2014 12:18:09 UTC+1, Amit Murthy wrote:
Sorry, couldn't find anything wrong with my edits. I don't see the error
you are seeing on my machine though.
On Wed, Apr 16, 2014 at
Hello,
I'm coming from Matlab and now, I'm staring playing with Julia and her
packages. One of the things that surprised me the most is that ones(1) and
ones(1,1) does not output the same result. The first one outputs 10-element
Array{Float64,1} while the second command 10x1 Array{Float64,2}.
I would recommend installing IPython 2.0 (the latest version),
Pkg.checkout(IJulia) to get the latest there (two weeks can mean fairly
out of date, Julia-land moves quickly for the moment), and upgrading your
emacs packages to the latest, and seeing if that helps (or at the very
least gives a
Hi joanenric—
Julia makes a distinction between column vectors (10-element
Array{Float64,1}) and row vectors (10x1 Array{Float64,2}). You can see this
reflected in how they print:
julia [1,2,3]
3-element Array{Int64,1}:
1
2
3 # column vector
julia [1 2 3]
1x3 Array{Int64,2}:
1 2 3 #
Hi,
consider the 2d array
x=[j+10*i for i=1:2, j=1:2]
I would like to take a slice along the first and the second dimensions, i.e.
julia x[1:2,1]
2-element Array{Int64,1}:
11
21
julia x[1,1:2]
1x2 Array{Int64,2}:
11 12
why is the second result a 2d array? Shouldn't a slice of 2d array
Adding a real life use case:
x=[j+10*i for i=1:2, j=1:2]
function f(x::Array{Int,1})
x
end
and then
julia f(x[1:2,1])
2-element Array{Int64,1}:
11
21
julia f(x[1,1:2])
ERROR: no method f(Array{Int64,2})
Yes, this is a less well-known property of DataFrames: they'll allow anything
as inputs, including objects of very high order. That's actually useful,
especially when working with Hive. But it is confusing, so we could raise an
error when taking in a scalar object of a type that has ndims 1.
I completely agree with you and would love to see julia drop singleton
dimensions indexed with scalar. There is an issue on this with lots of
discussion, which was left at the point of waiting til someone implements
some code to give it a try (see
https://github.com/JuliaLang/julia/issues/5949).
I'm trying iPython 2.0, but now I'm getting this error:
https://github.com/tkf/emacs-ipython-notebook/issues/137
That seems to still be an open issue with iPython 2. I get the same error
whether I use stable emacs 24 or a bleeding edge version.
Searched but didn't find an answer.
Does Julia allow statement to continue on the next line?
Thanks for linking to the issue. It seems that the array slicing is just a
tip of the iceberg, I had no idea about the discussion on the algebraic
interpretation of n x n arrays and respective operators. I somewhat
understand the arguments behind the need of elementwise operators (although
If the expression is incomplete, continuation is automatic. There is no
explicit continuation syntax.
On Apr 16, 2014, at 6:01 PM, cnbiz850 cnbiz...@gmail.com wrote:
Searched but didn't find an answer.
Does Julia allow statement to continue on the next line?
Thanks for the answer.
I tested previously this but it did not work:
if ab bc cd
de ef
But now this works:
if ab bc cd
de ef
So the got to be on the end of the first for it to know that the line
is not finished.
On 04/17/2014 06:25 AM, Stefan Karpinski wrote:
If the
Is there an implementation in Base (or elsewhere) of a Schur decomposition
that returns a complex matrix matrix T that is triangular? For reference,
MATLAB has a optional switch between the two forms. I didn't do enough
digging to see if this option is exposed by Lapack, so maybe the conversion
Hi all, I'm currently using pmap to distribute to a bunch of cores some
work to do. I was just wondering how you guys are structuring this.
Basically I have a function written in C that I need to pass a bunch of
parameters to so that it can do its work, so I first create a tuple with
all the
Thanks for all the suggestions. I did the command below in the end, which
should do for now. I use PyPlot for the plot commands. The only issue is that
it's a bit slow to export.
function tomovie(v::Array)
tm=string(time_ns())
dr=/tmp/ * tm * mov
mkdir(dr)
for
Hi all,
I was looking at some benchmark results (mainly the ones on julialang.org)
and I could not resist the thought that they are a bit misleading. I say
this as a Julia fan (I wish I did not think this way!) because
realistically I don't think one can expect a real world Julia application
While getting performance from Julia isn't always straightforward (see
http://julia.readthedocs.org/en/latest/manual/performance-tips/), I'm
curious why you find the benchmarks misleading? Is it because they're
focused on minimal examples, or maybe because they don't include some
of your use
I implemented a version of simplex method for rational numbers - so you
solve it exactly in pure Julia.
https://github.com/IainNZ/RationalSimplex.jl
Not for serious work - just for fun!
On Saturday, April 12, 2014 11:50:26 AM UTC-4, Stéphane Laurent wrote:
Thank you everybody. I have updated
Where's the MathProgBase interface? :)
On Wed, Apr 16, 2014 at 11:07 PM, Iain Dunning iaindunn...@gmail.com wrote:
I implemented a version of simplex method for rational numbers - so you
solve it exactly in pure Julia.
https://github.com/IainNZ/RationalSimplex.jl
Not for serious work - just
How would one go about benchmarking a set of implementations like those?
On Sunday, April 13, 2014 3:22:58 PM UTC-7, Stefan Karpinski wrote:
Please don't do this – or if you do and your program is amazingly slow,
then consider yourself warned. You can define a custom formatting function
Some more involved benchmarks here:
http://arxiv.org/pdf/1312.1431v1.pdf
achieve similar performance to the front-page benchmarks - see section 4.
On Wednesday, April 16, 2014 10:12:51 PM UTC-4, Jameson wrote:
There are very few types in Julia that are not custom.
Custom Types include:
Have you run the benchmarks on newer versions of Julia? Would be
interesting to see the delta.
On Wednesday, April 16, 2014 11:15:17 PM UTC-4, Iain Dunning wrote:
Some more involved benchmarks here:
http://arxiv.org/pdf/1312.1431v1.pdf
achieve similar performance to the front-page benchmarks
The trick is to convert your matrix to complex before the calculation.
schurfact(complex(A))[:T]
gives the triangular part.
2014-04-17 1:18 GMT+02:00 Joey Huchette joehuche...@gmail.com:
Is there an implementation in Base (or elsewhere) of a Schur decomposition
that returns a complex matrix
Ahh simple enough, thanks. It might be nice to have a keyword argument that
just dispatches on this---it's not completely obvious that's the right
thing to do unless you dig around lapack.jl (or get a hint). I can PR.
On Thursday, April 17, 2014 12:18:00 AM UTC-4, Andreas Noack Jensen wrote:
I'd love to beef up this wrapper type and add it to grid, but unfortunately
I wont' be able to get to it for a while -- probably late June.
On Tuesday, April 15, 2014 9:06:57 AM UTC-4, Tim Holy wrote:
On Tuesday, April 15, 2014 05:35:27 AM Spencer Lyon wrote:
It seems to me that this would
I prefer the present solution where we use dispatch instead of keywords. I
think it is transparent what is happening: real matrix - real schur form,
complex matrix - complex schur form. However, we could add a line in the
documentation explaining it. If you are okay with that idea, please open a
40 matches
Mail list logo