state_info is basically a dictionary holding
type State
s::Dict{C,A}
#some other code
end
@special macro creates a state_info for each function it precedes.
maybe i can
define +(x::C,y::C,state) and curry this for each function using @special
macro. However , +(::C,::C,::State) function seem
Higher than linear order interpolation on irregular grids is not supported in
either Grid.jl or Interpolations.jl (and since the latter is a replacement for
the former, it probably never will be supported in Grid). If you have a good
scheme that you'd like to see implemented, do file an issue wi
No i can't show you the two-liner, because it was Mike who suggested
that and i have no idea ^^
If you don't care where the beep comes from, you could also use the
AudioIO package and just let your normal speaker play the beep
using AudioIO
play([sin(x) for x=0:0.03*pi:441])
according to the doc
thank you - I will have a look.
Christoph
On Saturday, 27 February 2016 23:33:31 UTC, Simon Danisch wrote:
>
> You could try GLVisualize... There is the mario example to get you
> started: http://www.glvisualize.com/examples/interactive/
I have an application that runs in 2 environments, DEV and PROD. While
running in DEV I'd like to see @time information for different expressions.
But not in PROD. Any ideas about how can this be done so that I don't end
up littering my code with conditionals, such as:
if DEV
@time expr
el
Maybe something like:
if DEV
macro devtime(ex)
@time ex
end
else
macro devtime(ex)
esc(ex)
end
end
And then use @devtime instead of @time
On Sunday, February 28, 2016 at 4:03:23 PM UTC+1, Adrian Salceanu wrote:
>
> I have an application that runs in 2 environment
Perfect, thank you very much!
duminică, 28 februarie 2016, 16:09:36 UTC+1, Kristoffer Carlsson a scris:
>
> Maybe something like:
>
> if DEV
> macro devtime(ex)
> @time ex
> end
> else
> macro devtime(ex)
> esc(ex)
> end
>
> end
>
> And then use @devtime instead of
I think you want to change the first case to
macro devtime(ex)
quote
@time $(esc(ex))
end
end
right?
Hey,
I have a (probably) very simple question. I would like to define
'Probability' as a new subtype of 'Real', only with the additional
restriction that the value must be between 0 and 1. How would I achieve
that 'Julia-style'? This should be possible without having to rewrite all
these promo
Indeed, I was now trying to debug Kristoffer's solution myself, as using
the macro was throwing an UndefVarError
This works perfectly, many thanks!
duminică, 28 februarie 2016, 16:31:31 UTC+1, Toivo Henningsson a scris:
>
> I think you want to change the first case to
>
> macro devtime(ex)
>
hi tony---thanks. I will keep an eye on the docs (presumably streams).
from a novice end-user (not developer) perspective, solving the specific
snippet that I noted would be great in the documentation pages. regards,
/iaw
Ivo Welch (ivo.we...@gmail.com)
http://www.ivo-welch.info/
J. Fred
Given that JuMP and Convex.jl are both AMLs, I always don't understand the
difference between them.
On Saturday, February 27, 2016 at 11:14:16 PM UTC+1, Miles Lubin wrote:
>
> The JuMP team is happy to announce the release of JuMP 0.12.
>
> This release features a complete rewrite of JuMP's auto
Hello,
thanks for your explanations.
Nevertheless I like the syntax of the package Dierckx much more.
The expression Gridded(Linear()) is very confusing for me. What is gridded,
in this example?
Furthermore the Readme file of Interpolations is missing the information,
how
to use it for the give
Hello,
what is the best way to implement a scalar and a vectorized version of a
function?
My code:
const Z_REF = 10.0# reference height for wind profile law
const ALPHA = 0.23375 # exponent of the wind profile law for Cabauw
"""
calcWindAtHeight(v_wind_gnd, z)
Calculate the average wind
you can get the vectorized version in one line using a comprehension:
calcWindAtHeight(v_wind_gnd, Z::AbstractArray) =
[calcWindAtHeight(v_wind_gnd,z) for z in Z]
i did a quick test and it seems to be about the same speed/slightly
faster than your version.
you could also use map and a lambda fun
Thanks for the correction. I still don't really grok macros well.
Thank's a lot!
My code looks now like this:
const Z_REF = 10.0# reference height for wind profile law
const ALPHA = 0.23375 # exponent of the wind profile law for Cabauw
"""
calcWindAtHeight(v_wind_gnd, z)
Calculate the average wind speed for the given ground wind speed
`v_wind_gnd` at a
for documentation, see
http://docs.julialang.org/en/release-0.4/manual/documentation/#functions-methods
so, you could put that last sentence of your documentation above the
array implementation, and in single double quotes. When someone uses
?calcWindAtHeight in REPL, both documentation texts wil
Hi,
I was wondering whether how i can do implicit conversion at time of
dispatch.
Here is an example
+(x::A,y::A) = C(x,y)
implicit_convert(::C) = #some operations returning type A
function f(x::A,y::A)
end
Le dimanche 28 février 2016 à 21:33 +0100, FQ a écrit :
> for documentation, see
>
> http://docs.julialang.org/en/release-0.4/manual/documentation/#functions-methods
See also https://github.com/JuliaLang/julia/pull/15136
> so, you could put that last sentence of your documentation above the
> ar
Sorry I accidentaly pressed post,
Hi,
I was wondering whether how i can do implicit conversion at time of
dispatch.
Here is an example
+(x::A,y::A) = C(x,y)
implicit_convert(::C) = #some operations returning type A
function f(x::A,y::A)
(x+y)+x
end
in the function f , once x+y is executed
Sounds like you should read up on promotion:
http://docs.julialang.org/en/release-0.4/manual/conversion-and-promotion/
On Sunday, February 28, 2016, Julia Tylors wrote:
> Sorry I accidentaly pressed post,
>
> Hi,
>
> I was wondering whether how i can do implicit conversion at time of
> dispatch
Gridded here is the *interpolation scheme*, as opposed to (implicitly
uniform) BSpline interpolation; it’s simply the way Interpolations.jl lets
you specify which algorithm you want to use. Compare the following
incantations:
itp = interpolate(A, BSpline(Linear()), OnGrid()) # linear b-spline
a review of the REQUIRE sets for each package gives some high level sense
of the differences:
https://github.com/JuliaOpt/JuMP.jl/blob/master/REQUIRE
https://github.com/JuliaOpt/Convex.jl/blob/master/REQUIRE
enjoy !!!
cdm
I realize now I may have been misunderstanding
http://docs.julialang.org/en/release-0.4/manual/performance-tips/#avoid-containers-with-abstract-type-parameters
for a long time... Is the recommendation there only related to
parameterized types, or any user defined type? My specific question, in
On Sun, Feb 28, 2016 at 6:49 PM, Jonathan Goldfarb wrote:
> I realize now I may have been misunderstanding
> http://docs.julialang.org/en/release-0.4/manual/performance-tips/#avoid-containers-with-abstract-type-parameters
> for a long time... Is the recommendation there only related to parameteriz
On Sun, Feb 28, 2016 at 7:24 PM, Yichao Yu wrote:
> On Sun, Feb 28, 2016 at 6:49 PM, Jonathan Goldfarb wrote:
>> I realize now I may have been misunderstanding
>> http://docs.julialang.org/en/release-0.4/manual/performance-tips/#avoid-containers-with-abstract-type-parameters
Also note that the r
Yes, that's the performance tip I meant. Thanks for your detailed response and
reference to the issue; that sounds like a good way forward. I'll be looking
forward to future developments
Regards,
-Max
> On Feb 28, 2016, at 7:26 PM, Yichao Yu wrote:
>
> On Sun, Feb 28, 2016 at 7:24 PM, Yichao Y
Congratulations Simon :) Now let's get quickly to a Vulkan backend
On Saturday, 27 February 2016 22:46:56 UTC+9, Simon Danisch wrote:
>
> Thanks :)
>
> >I wonder if it will be the Matplotlib of Julia
>
> While possible, it will need quite a bit of work :) Offering the
> flexibility and usability
29 matches
Mail list logo