I don't know whether that is mentioned in those issues but one trick is
to have a function fabricating the expression and call that in the
macro:
mymacro_fn(args...) = ...
macro mymacro(args...)
mymacro_fn(args...)
end
If something goes wrong debug it with calling the function directly
which
This hasn't been updated in a while, so it's probably just broken (I don't
think it sees much use). `jlmake` is just an alias, defined in
/home/vagrant/.bash_aliases during provisioning, which sets as many of the
USE_SYSTEM_dep variables to true as it can. Dependencies have probably
gotten
Ah, that explains it. I'm not sure if there's a way to disable or warn on
non-const globals, but it's a good question. @code_warntype did a pretty
good job at pinpointing the problems they caused, and Lint.jl also might
have caught them (would need to try it).
On Monday, April 6, 2015 at
Hello Rob,
Thank you for your comments and sorry for my late answer. I have been away
for a while.
I should have stressed in my post that the files I attached was only a
minimum working example from which someone should easily be able to write
their own custom exporter. The data structures in
Thanks so much for the help. Lint.jl does catch the use of global. Well, it
says it's undefined because it hasn't been defined yet... I guess this is
a good reason to put methods first.
Let me see how this does after a few more complex modifications!
David
On Monday, April 6, 2015 at
Thanks for the replies. I took your suggestions (and reread the scope
section of the docs) and am still experiencing the gc creep. Below is the
complete program, with the notable changes that I wrapped the main
computation in a function and eliminated all references to global variables
inside.
Hi,
Intrigued
by https://github.com/jesusfv/Comparison-Programming-Languages-Economics, I
did a little exercise
function valuefnc(x, V)
n=length(x)
a=0.1;
b=0.9;
out=zeros(n);
for(i=1:n)
out[i]=maximum(log((1 + x[i]^a) .- x) .+ b*V[i]);
end
out
end
And for the grid
There is a lot of memory that gets allocated in the maximum(...) line.
Ideally, our memory management would be able to do something better than
allocating memory for every loop iteration - but that is already happening.
In the meanwhile, I can devectorize and get this:
function valuefnc(x, V)
Thank you very much for prompt reply, Viral.
I see now that de-vectorization is crucial for performance in Julia( which
actually is my cognitive sticking point).
I've also tried RcppArmadillo,only to find out that it runs only slightly
faster (around 1sec).
As you said, logs and pows take most
That’s right - if you are doing lots of vectorized operations - effectively
time is spent in C code, and all languages tend to perform equally. Often
devectorizing gives much larger speedups - but in this case, the running time
is dominated by the math functions.
-viral
On 06-Apr-2015, at
there could be so many ways to do this
that it might be worth asking about the use case
the derivatives, of course, satisfy the same three term recurrence
but with different initial conditions
so it might be worth knowing if
0. whether this is worth optimizing a great deal or just a little
Which pca?
2015-04-06 6:53 GMT-07:00 Steven Sagaert steven.saga...@gmail.com:
does pca() center the input output data or do you have to do that
yourself?
does pca() center the input output data or do you have to do that
yourself?
Not sure it's trivial as this but endif is not a keyword in Julia.
On Apr 6, 2015, at 9:05 AM, Jim Christoff j.christof...@gmail.com wrote:
First, Julia is a great replacement for Octave and in most cases C. I have
used Octave for decades and Julia for a year or so.
I still have problems
First, Julia is a great replacement for Octave and in most cases C. I
have used Octave for decades and Julia for a year or so.
I still have problems making the conversions. Any assistance will be
greatly appreciated.
This is short example of the modified Octave code that I have tried to
There is a recurrence relation for the derivatives but it involves the
Chebyshev polynomials of second kind.
Chebyshev polynomials of first kind:
T_0(x) = 1
T_1(x) = x
T_(n+1)(x) = 2x.T_n(x) - T_(n-1)(x)
Chebyshev polynomials of second kind:
U_0(x) = 1
U_1(x) = 2x
U_(n+1)(x) = 2x.U_n(x) -
I haven't yet had time to look at FileIO, but if the code has been lifted from
Images, then it uses the magic bytes in preference to the file extension (when
the magic bytes are recognized).
Best,
--Tim
On Monday, April 06, 2015 06:30:40 AM Sebastian Good wrote:
Very interesting project. I've
If all you wanted was one derivative, i'd consider just an arccos and sines
formula
i gathered it was multiple derivatives desired
On Mon, Apr 6, 2015 at 8:04 AM, Paulo Jabardo pjaba...@gmail.com wrote:
There is a recurrence relation for the derivatives but it involves the
Chebyshev
Thanks to everyone for the replies.
I found that the excellent Chebyshev and Fourier Spectral Methods by J
P Boyd discusses computation of derivatives in one of the appendices
(A), suggesting 3 practical methods: (i) use the variable transformation
in terms of the cosine, (ii) use Gegenbauer
Very interesting project. I've worked a little on problems like this in my
projects and have found that filename extensions aren't always enough to
distinguish filetypes. It's not uncommon to have to scan the first few
(hundred) bytes looking for distinctive patterns, magic cookies, etc. to
Thanks Miles --
I had seen the brief discussion in 8701, but had totally missed 1334, and
6910 -- both are excellent resources that help me get my head around the
issues involved.
Nehal
Can you describe what kind of a problem you are having?
On Apr 6, 2015, at 10:51 AM, Jim Christoff j.christof...@gmail.com wrote:
That was not it
On Monday, April 6, 2015 at 9:05:16 AM UTC-4, Jim Christoff wrote:
First, Julia is a great replacement for Octave and in most cases C. I have
That was not it
On Monday, April 6, 2015 at 9:05:16 AM UTC-4, Jim Christoff wrote:
First, Julia is a great replacement for Octave and in most cases C. I
have used Octave for decades and Julia for a year or so.
I still have problems making the conversions. Any assistance will be
greatly
I suspect you want
## generate next filter order
if i==1
a[i] = g
else
a[i-1:-1:1] = a[i-1:-1:1]-g*a[i-1:-1:1] # this is my problem
area*
end
a is first assigned as a Vector{Float64} of length p. Then you did a=g
which assigns a as a Float64 (this
the one from the standard lib
On Monday, April 6, 2015 at 4:01:00 PM UTC+2, Andreas Noack wrote:
Which pca?
2015-04-06 6:53 GMT-07:00 Steven Sagaert steven@gmail.com
javascript::
does pca() center the input output data or do you have to do that
yourself?
Thank you very much for that clear description. That was the problem and it
is producing the expected results.
On Monday, April 6, 2015 at 10:53:40 AM UTC-4, g wrote:
I suspect you want
## generate next filter order
if i==1
a[i] = g
else
a[i-1:-1:1] =
There is no pca in Julia Base
2015-04-06 9:16 GMT-07:00 Steven Sagaert steven.saga...@gmail.com:
the one from the standard lib
On Monday, April 6, 2015 at 4:01:00 PM UTC+2, Andreas Noack wrote:
Which pca?
2015-04-06 6:53 GMT-07:00 Steven Sagaert steven@gmail.com:
does pca() center
thanks!
On Monday, April 6, 2015 at 6:43:54 PM UTC+2, Stefan Karpinski wrote:
Looks like yes:
https://github.com/JuliaStats/MultivariateStats.jl/blob/master/src/pca.jl
On Mon, Apr 6, 2015 at 12:27 PM, Steven Sagaert steven@gmail.com
javascript: wrote:
I meant the one in
I meant the one in MultivariateStats package
On Monday, April 6, 2015 at 6:19:51 PM UTC+2, Andreas Noack wrote:
There is no pca in Julia Base
2015-04-06 9:16 GMT-07:00 Steven Sagaert steven@gmail.com
javascript::
the one from the standard lib
On Monday, April 6, 2015 at 4:01:00 PM
Making the change
length(nzrange(P.A,u)) for du and dv
fixes the issue. (Of course.)
Is there any way to disable non-const global variables within a function?
(Or warn when they are used?)
David
On Saturday, April 4, 2015 at 4:08:38 AM UTC-4, Tony Kelman wrote:
This is an excellent use
Looks like yes:
https://github.com/JuliaStats/MultivariateStats.jl/blob/master/src/pca.jl
On Mon, Apr 6, 2015 at 12:27 PM, Steven Sagaert steven.saga...@gmail.com
wrote:
I meant the one in MultivariateStats package
On Monday, April 6, 2015 at 6:19:51 PM UTC+2, Andreas Noack wrote:
There is
You may want to verify that since I looked very briefly at the code there.
On Apr 6, 2015, at 12:47 PM, Steven Sagaert steven.saga...@gmail.com wrote:
thanks!
On Monday, April 6, 2015 at 6:43:54 PM UTC+2, Stefan Karpinski wrote:
Looks like yes:
Indexing of a Float64 is actually a bit inconsistent. It works for a single
integer, but not for Ranges.
*julia **a=4.5*
*4.5*
*julia **a[1]*
*4.5*
*julia **a[1:-1:1]*
*ERROR: `getindex` has no method matching getindex(::Float64,
::StepRange{Int64,Int64})*
*julia **a[1:1]*
*ERROR:
33 matches
Mail list logo