Hi Mike,
Just a thought, I am not sure if it matters in the end: In your `intersect`
function you are using `None` as a default return value and later in
`radiance` you compare objects with `None`. I think it would be better to
use (for example) `nothing` here, because the comparison is faster
ProfileView makes your life a lot easier. You just visually pick out the widest
bars for inspection.
--Tim
On Monday, May 19, 2014 09:17:40 PM mike c wrote:
On Tuesday, 20 May 2014 11:57:15 UTC+10, Tim Holy wrote:
I can't look at all that code, but one quick thought: can you use
Maybe, but I really don't understand this code :(
Is it supposed to work with Ubuntu 14 too ?
Le samedi 25 janvier 2014 20:37:03 UTC+1, Stefan Karpinski a écrit :
Just do this:
git clone https://github.com/JuliaLang/julia.git
cd julia
make
It will take a while, but it will download all the things you need under
the deps directory,
On Tuesday, 20 May 2014 17:04:08 UTC+10, Alex wrote:
Just a thought, I am not sure if it matters in the end: In your
`intersect` function you are using `None` as a default return value and
later in `radiance` you compare objects with `None`. I think it would be
better to use (for
Hi Tim,
On Tuesday, 20 May 2014 18:58:05 UTC+10, Tim Holy wrote:
ProfileView makes your life a lot easier. You just visually pick out the
widest
bars for inspection.
I did a Pkg.add(ProfileView) on my OSX Mavericks machine.
I see that a bunch of other packages are installed and Brew
I can't help you but maybe it could help to look at the extensive
documentation for chebfun, the matlab original:
http://www2.maths.ox.ac.uk/chebfun/guide/
On Tue, 2014-05-20 at 10:07, julia-users@googlegroups.com wrote:
Maybe, but I really don't understand this code :(
Hi,
I'm still confused as to the two types of NULL.
Well, *I think* the main point is that nothing is an instance of the type
Nothing, while None is itself a type (the bottom of the type graph). In
the context of intersect it seems to make sense to return an object or
nothing.
I
There are lots of minor performance/style tips we can give, but they are
unlikely to make any noticable difference in total execution time. I did
look at the Profile, and it seems to spend much time on lines containing
vectorized expressions. I am not able to follow the code flow, and that
This may be an issue more for Homebrew.jl than ProfileView.
In the meantime, right-click on the bars and it will display the source line
in the REPL.
--Tim
On Tuesday, May 20, 2014 02:39:41 AM mike c wrote:
Hi Tim,
On Tuesday, 20 May 2014 18:58:05 UTC+10, Tim Holy wrote:
ProfileView
On Tuesday, 20 May 2014 20:09:30 UTC+10, Alex wrote:
BTW, have you actually tried julia 0.3-prerelease? This might also make a
difference ...
I got about another 10-15% speedup with julia0.3, but I've since started
using Devectorize in v0.2 (which gives a small boost), but get an error
On Tuesday, 20 May 2014 20:29:30 UTC+10, Ivar Nesje wrote:
There are lots of minor performance/style tips we can give, but they are
unlikely to make any noticable difference in total execution time.
That's ok. I was hoping that there would be a couple of really obvious
things i missed,
I'm also pretty excited about using the rift for scientific/technical
visualization (I have a DK1), but so far that hasn't been reflected by
an appropriate amount of spare hacking time.
If you haven't already, I'd recommend checking out the VRUI youtube
demos (for example, this one is pretty
Julia pathtracer is now rendering the test scene in 11s !! (all updated
code is in the repository)
In the end Ivar Nesje's suggestion made me remove @devec and manually
devectorize the 4 places which had complicated vector maths. Immediately
the time dropped from 27s to 11s.
So julia code
Tim
On Tuesday, 20 May 2014 20:29:31 UTC+10, Tim Holy wrote:
This may be an issue more for Homebrew.jl than ProfileView.
I may have a hosed brew install that wasn't removed correctly. Not sure.
Softlinked the /usr/local/Cellar path to the new path and everything
worked.
thanks for the
I'm believe I'm working in a relatively niche area, but I'm going to throw
my request in anyway :)
I often work with image sequences (from a still or video camera, but
nothing more exotic than broadcast cameras) which are to be displayed at
video rate (25/50/...Hz), somewhere on a texture in
On 5/19/14, 20:14, mike c wrote:
Im having my first look at julia and translated a pathtracer written in
python into julia. (A pathtracer is a kind of raytracer)
The translation was relatively painless, and I've mimicked the python
classes that I lost by using julia's compound types. Code is
a=rand(5)
b=zeros(5,5)
how to apply a on diagonal b ?
Paul
Macros are somewhat weird and a somewhat weird syntax seems appropriate in
my opinion. A macro is very different from a function, and a syntax that
sets it clearly visually apart is a good thing.
Julia also have a convention to have `!` at the end of mutating functions,
which sets them
Hi,
On Tuesday, May 20, 2014 3:13:15 PM UTC+2, Ivar Nesje wrote:
Macros are somewhat weird and a somewhat weird syntax seems appropriate in
my opinion. A macro is very different from a function, and a syntax that
sets it clearly visually apart is a good thing.
In your opinion. A macro is
On 20/05/14 14:38, Florian Oswald wrote:
I have an array A that i want to subset, as in
|
A =rand(100,100)
A[A.0.5]
|
I'm struggling to find the extension of this to more than one rule - i
would have expected that to work:
|
A[A.0.5A.0.9]
ERROR:nomethod (Float64,Float64)
|
in at
oops - i could swear i tried that!
sorry. thanks.
On 20 May 2014 14:41, Samuele Carcagno sam.carca...@gmail.com wrote:
On 20/05/14 14:38, Florian Oswald wrote:
I have an array A that i want to subset, as in
|
A =rand(100,100)
A[A.0.5]
|
I'm struggling to find the extension of this to
Try to add parentheses
*A[(A.0.5)(A.0.9)]*
The expressions you posted reads
A[ A . (0.5A) . 0.9]
There is an open issue about the high precedence of
Ivar
kl. 15:38:08 UTC+2 tirsdag 20. mai 2014 skrev Florian Oswald følgende:
I have an array A that i want to subset, as in
A =
See: https://github.com/JuliaLang/julia/issues/5187
kl. 15:45:43 UTC+2 tirsdag 20. mai 2014 skrev Ivar Nesje følgende:
Try to add parentheses
*A[(A.0.5)(A.0.9)]*
The expressions you posted reads
A[ A . (0.5A) . 0.9]
There is an open issue about the high precedence of
Ivar
kl.
I have an array A that i want to subset, as in
A = rand(100,100)
A[A.0.5]
I'm struggling to find the extension of this to more than one rule - i
would have expected that to work:
A[A.0.5A.0.9]
ERROR: no method (Float64, Float64)
in at array.jl:743
how can I get a valid boolean index vector
As another option you could use chained comparisons in this case (I think
that's what they're called).
A[0.5 . A . 0.9]
On Tuesday, 20 May 2014 15:38:08 UTC+2, Florian Oswald wrote:
I have an array A that i want to subset, as in
A = rand(100,100)
A[A.0.5]
I'm struggling to find the
A macro has different rules from function calls, which are reflected in
it's different calling syntax. Macros have more power to affect your code
in strange ways; a macro's arguments may not get run (if the macro doesn't
use them), a macro could change the value of local variables not involved
in
Jeff gave these reasons a long time
ago:
https://github.com/JuliaLang/julia/blob/3c354b4a391307d84915445bdd6fb464371f30fc/doc/at_macro_reasons
As a lisper, I of course understand the ugliness of @. But I think on the
balance it is worth it:
- it alerts you that something different is
Sorry, message was posted too quickly:
Here is my report of the build:
in /home/ivo/julia:
git clone git://github.com/JuliaLang/julia.git
cd julia
in /home/ivo/julia/julia:
make
/bin/sh: 2: g++: not found
make[2]: *** [/home/ivo/julia/julia/usr/lib/libgrisu.so] Error 127
make[1]: ***
I have several libraries I wrote in python that I want to convert to Julia
that are for neural networks and exponential smoothing.
My questions are what do I do about the classes? I have not seen classes in
julia.
Also which libraries do I submit them to? It seems like julia has lots of
I want to convert some of my python code for exponential smoothing and
Neural networks from python over to julia.
My questions are:
What should I do about the classes? I have not seen classes in julia yet so
I am guessing they are all functions.
Secondly what library should they go in. Julia
Hi Paul,
if b is just zeros, then b = diagm(a).
Best,
Oliver
Den tirsdag den 20. maj 2014 15.04.33 UTC+2 skrev paul analyst:
a=rand(5)
b=zeros(5,5)
how to apply a on diagonal b ?
Paul
b- not is zeros sometimes...
c= diagm(a)
b=b+c.
Thx
Paul
W dniu wtorek, 20 maja 2014 16:17:11 UTC+2 użytkownik Oliver Lylloff
napisał:
Hi Paul,
if b is just zeros, then b = diagm(a).
Best,
Oliver
Den tirsdag den 20. maj 2014 15.04.33 UTC+2 skrev paul analyst:
a=rand(5)
Python classes map pretty much 1 to 1 to Julia composite types. One just
has to feed in the type a the first argument in functions.
Am Dienstag, 20. Mai 2014 14:49:14 UTC+2 schrieb ccsv.1...@gmail.com:
I want to convert some of my python code for exponential smoothing and
Neural networks
I don't know much about Julia's math libraries, so I'll leave that for
someone else.
In Julia, types are just data and functions use multiple dispatch to select
which values they work with.
For example, a Python class A with methods foo(self, x, y) and bar(self, z)
would become:
~~~
type A
Yes, and for larger arrays it might be beneficial to write in a loop:
a = rand(1000);
b = rand(1000,1000);
for i = 1:length(a)
b[i,i] = b[i,i] + a[i];
end
Den tirsdag den 20. maj 2014 16.48.30 UTC+2 skrev paul analyst:
b- not is zeros sometimes...
c= diagm(a)
b=b+c.
Thx
Paul
W dniu
Hi Andreas,
hi John,
hi Miles (via julia-opt, where I mistakenly also posted my question
yesterday),
Thanks for your help. Here is the link to the Gist I created:
https://gist.github.com/anonymous/5f95ab1afd241c0a5962
In the process of producing a minimal (non-)working example, I discovered
When I set autodiff = true in the Gist I posted above, I get the message
ERROR: no method clogit_ll(Array{Dual{Float64},1},).
Holger
On Monday, 19 May 2014 14:51:16 UTC+1, John Myles White wrote:
If you can, please do share an example of your code. Logit-style models
are in general
Glad that you were able to figure out the source of your problems.
It would be good to get a sense of the amount of time spent inside your
objective function vs. the amount of time spent in the code for optimize(). In
general, my experience is that 90% of the compute time for an optimization
Yes, to use autodiff you need to make sure that all of the functions you call
could be applied to Array{T} for all T : Number. The typing on your code is
currently overly restrictive when you define clogit_ll(beta::Vector{Float64})
and friends. If you loosen things to clogit_ll(beta::Vector),
We really should have a FAQ entry on this. It's a frequently asked question
:)
/ Toivo
On Tuesday, 20 May 2014 16:49:30 UTC+2, Tobias Knopp wrote:
Python classes map pretty much 1 to 1 to Julia composite types. One just
has to feed in the type a the first argument in functions.
Am
Thanks Prof. Bates and Stefan. I have made myself more familiar with Julia
because I want to use Octave and R less. However, even though some of the
Julia resistance from the R community is not tenable, it seems a bit unfair
to ask R users to shift their work to Julia at this point. For
I have arrays about 10k*10k. Is faster by loop?
Paul
W dniu 2014-05-20 17:18, Oliver Lylloff pisze:
Yes, and for larger arrays it might be beneficial to write in a loop:
a = rand(1000);
b = rand(1000,1000);
for i = 1:length(a)
b[i,i] = b[i,i] + a[i];
end
Den tirsdag den 20. maj 2014
All those dependencies are in the READAME
On Tuesday, May 20, 2014 6:46:41 AM UTC-4, Ivo Balbaert wrote:
Sorry, message was posted too quickly:
Here is my report of the build:
in /home/ivo/julia:
git clone git://github.com/JuliaLang/julia.git
cd julia
in /home/ivo/julia/julia:
make
That's a very reasonable position and I tend to agree that it should be
possible even if not cheap to delete edges. That issue, however, is quite
specific to Graphs.jl, not Julia as a whole. You should open an issue
requesting the feature on the Graphs.jl GitHub repository and see what comes of
Serlialize is very slow for string.
Is there any way the to speed it up at present, or an alternative way to
save data structures which is significantly faster?
Are there any plans to speed up string serialization in Julia? Is there an
easy low hanging fruit which needs work and could speed
Regarding this comment:
Even just serializing a single string profile shows masses of calls in
inference.jl. Surely this shouldn't be necessary?
You'll need to run it twice to get useful results; the first time, the
code must be compiled and therefore many calls are indeed made to inference.
On Tuesday, May 20, 2014 07:22:51 PM Paul Analyst wrote:
I have arrays about 10k*10k. Is faster by loop?
I think you'll find that loops are a generic answer to many of the questions
you've asked on this list. While in some languages loops are slow and you
_have_ to know about and use some
Hi,
Probably it is because I come from a numpy world, but why does slicing by
column differs from slicing by row?
a = ones(Float64, (10, 10))
println(typeof(a[1, :])) # this gives Array{Float64,2} ( i expected a 1d
array )
println(typeof(a[:, 1])) # this gives Array{Float64,1}
Davide
You don't need the {T} on the constructor; being inside the type definition
gives you access to that T.
Your call to the constructor needs to have the type parameter explicitly.
The type parameter here indicates which type you want to create.
~~~
MyType{Float64}(zeros(Float64, 5), [param=2.0])
Hi Davide,
There is already some good answers to your question on the list. See for
instance:
https://groups.google.com/forum/#!searchin/julia-users/array$202d$20scalar/julia-users/L3vPeZ7kews/LY60boyLhnoJ
Hope this is what you were looking for.
Best,
Oliver
Den tirsdag den 20. maj 2014
Can you open a pull request? That's the best way to send a diff and have it
evaluated.
On Tuesday, May 20, 2014, David Moon dave_m...@alum.mit.edu wrote:
I finally found time to get back to this. I found that it was easier to
implement (i.e. many fewer changes to the existing Julia
I think that the short answer is that a column vector is not the same thing
than a row vector. Note that Array{Float64,1} (N-vector) is kind of
equivalent to column vectors (Nx1 matrices) in Julia (meaning you can use
them in linear algebra operations), that might be where the confusion comes
Hi,
I would do a while as the loop is a conditional loop :
function test(x::Vector{Float64})
i = 1
while i = length(x) x[i] != 0.0
i += 1
end
return i - 1
end
or I would use a return inside the for loop even though I prefer to avoid a
return in the middle of a
Hi,
I would do a while as the loop is a conditional loop :
function test(x::Vector{Float64})
i = 1
while i = length(x) x[i] != 0.0
i += 1
end
return i - 1
end
or I would use a return inside the for loop even though I prefer to avoid a
return in the middle of a
This method is also a bit faster as you can check with @time. I guess that
it's because there is only one if per loop as opposed to 2 if per loop
in your design (Are we at the end of the array ? Is it a 0.0 ?).
François
On Wednesday, May 21, 2014 12:09:02 AM UTC+2, francoi...@gmail.com wrote:
Also, your program is weird. My guess is that you want to give the largest
k such that x[1],..., x[k] are not equal to 0. If you want that, your
program is wrong when x does not contain any 0.
The fact that if x does not contain any 0, your program return length(x) -
1 is very weird to me.
On
I am used to write at matlab dot([1 1], [1 1]). I know I can use [1 1]'
*[1 1] to calc the dot product, but I use that way because I think is
faster without ask to transpose, I tried do the samething with julia and
get dot([1.0 1.0],[1.0 1.0])
MethodError(dot,(
1x2 Array{Float64,2}:
1.0
In Julia, [1.0 1.0] is a 1x2 Array. If you insert commas you get a
2-element vector and then dot works, i.e.
dot([1.0, 1.0], [1.0, 1.0])
On Tuesday, May 20, 2014 8:25:01 PM UTC-4, Altieres Del-Sent wrote:
I am used to write at matlab dot([1 1], [1 1]). I know I can use [1 1]'
*[1 1] to calc
Hi,
Using a freshly updated Version 0.3.0-prerelease+3251 (2014-05-20 23:18 UTC) of
Julia I think I noticed a different behavior of readtable(), which I hope is
not intended.
I have a small test file with data as shown below (and attached as a file at
the end of the email):
It should work if you add:
Scale.x_discrete(levels=[a, b, c])
where [a, b, c] is a vector of the values in the order you'd like
them to appear.
On Tue, May 20, 2014, at 05:32 PM, Dan B wrote:
Friends,
I have a simple array that has counts (sorted descending) and names
associated
While I cannot not agree with this ;), I'd like to state that:
1) High level functions might leverage clever algorithms faster than plain
loops (best example comming to mind: dot).
2) Vectorized code is always easier to understand, write, fix and maintain
because the intent is clear from the
Actually, another way to make it work is removing the blank line. Below little
program shows that readtable() accepts test_df1 and test_df2, but fails on
test_df3.
Also, the fact that it started to happen today had nothing todo with Julia or
DataFrame updates. The file is created by Stan and
Hi there,
I'm using DataFrames package and having problems using NA on Array{Any}.
Here is the thing:
julia a = [true 2 hi]
1x3 Array{Any,2}:
true 2 hi
That's expected, Julia had no way to promote this elements to a single
concrete type, so I got an Array{Any}. Now, if I try:
julia a[3] =
Perhaps a setdiag!(b,a) function would be handy.
On Tuesday, May 20, 2014 10:46:28 PM UTC-4, gael@gmail.com wrote:
While I cannot not agree with this ;), I'd like to state that:
1) High level functions might leverage clever algorithms faster than plain
loops (best example comming to
From one Daniel to the next - thanks! :) This looks like exactly what I
need. If I try manually constructing a vector with the names like you did,
then it does order the bars. However, if I try to pass in an array, I get
the following. Please note - Im new to Julia so I may have some
I agree, that should work. I'll try to fix it when I have a chance.
In the mean time, a work around would be to use
levels=collect(xs) where xs is your vector of names. That will
effectively convert the PooledDataArray to a regular Array, so should
work.
On Tue, May 20, 2014, at 08:25 PM,
Thanks Daniel! Works perfectly! Very much appreciated :)
On Tuesday, May 20, 2014 8:43:55 PM UTC-7, Daniel Jones wrote:
I agree, that should work. I'll try to fix it when I have a chance.
In the mean time, a work around would be to use levels=collect(xs) where
xs is your vector of
No problem. :)
On Tue, May 20, 2014, at 08:55 PM, Dan B wrote:
Thanks Daniel! Works perfectly! Very much appreciated :)
On Tuesday, May 20, 2014 8:43:55 PM UTC-7, Daniel Jones wrote:
I agree, that should work. I'll try to fix it when I have a chance.
In the mean time, a work around
69 matches
Mail list logo