On Thu, 2016-06-16 at 07:32, Chris Rackauckas wrote:
> There seems to be an interesting change between v0.4.5 and v0.5. Take a
> look at the following code:
>
> if largeFluctuations
> function σ(y,t)
> dσ = zeros(19)
> dσ[1] = noiseLevel*1.5y[1]
> dσ[18]= noiseLevel*6y[18]
On Wed, 2016-06-15 at 20:37, Ford O. wrote:
> vars() = (:x, :y, :z)
>
> foo(x, y, z) = eval(vars()[1]) + eval(vars()[2]) + eval(vars()[3])
>
> x = y = z = 1
>
> @show foo(10, 10, 10)
>
>
> foo(10, 10, 10) = 3
>
>
>
> Is this intended?
Yes
> function myjaccard2(a::Array{Float64,1}, b::Array{Float64,1})
> num = 0.
> den = 0.
> for I in 1:length(a)
> @inbounds ai = a[I]
> @inbounds bi = b[I]
> num = num + min(ai,bi)
> den = den + max(ai,bi)
> end
> 1. - num/den
> end
>
>
>
> function
Better repost this to julia-opt list. Mauro
On Mon, 2016-06-13 at 04:27, JC wrote:
> I have been trying to use JuMP for an optimization problem and ran into
> many issues.
>
> 1. I made my own function called myf and try to register that so that I can
> read it into my objective
I am not sure I quite understand. But it looks like you know how to
improve the Jaccard distance code, so why not make a pull request at
Distances.jl?
> function myjaccard2(a::Array{Float64,1}, b::Array{Float64,1})
>num = 0
>den = 0
>for i in 1:length(a)
>
I also found that GR is a lot faster than PyPlot, so give that a try.
On Mon, 2016-06-13 at 09:57, Andreas Lobinger wrote:
> Hello colleague,
>
> On Sunday, June 12, 2016 at 10:31:06 PM UTC+2, CrocoDuck O'Ducks wrote:
>>
>> Hi there!
>>
>> I have been experimenting a little with many plotting pac
You're probably looking for @goto ;-)
Although break may be what you want:
julia> for i=1:10
for j=1:10
if j==3
break
end
end
println(i,j)
end
13
23
33
43
53
63
73
83
93
103
On Fri, 2016-06-10 at 21:26, Ford O. wrote:
> Why is there no keyword t
On Fri, 2016-06-10 at 17:13, Chris Rackauckas wrote:
...
> Thanks for helping me get more focus! Do you plan on moving to ODE.jl to
> JuliaMath? When I hit the major release, I think we should be considering
> bringing us together under some organization.
Thanks for the good discussion! I don't
Thanks for the update, looks good!
On Thu, 2016-06-09 at 23:18, Jukka Aho wrote:
> Hi,
>
> JuliaFEM developer here.
>
> About performance. I recently measured FEM problem assembly time vs. solver
> time to find out the performance of JuliaFEM. Point was to find out when
> assembly time is less th
here a way around this?
>
> My computer/version details:
>
> Processor: 3,1 GHz Intel Core i7
>
> Memory: 16 GB 1867 MHz DDR3
>
> Graphics: Intel Iris Graphics 6100 1536 MB
> OS: El Capitan, 10.11.3 (15D21)
>
> Thanks,
>
> Robert Feldt
>
> Den fredag 10 juni
You need to install the arrayfire library by hand:
https://github.com/JuliaComputing/ArrayFire.jl#installation
If done already, check the trouble shooting section.
On Fri, 2016-06-10 at 12:10, Fred wrote:
> Hi !
>
> Thank you for this great package ! I tried to install it on Julia 0.4.5 but I
>
rised you guys don't have a DP78 method, but it
> shouldn't take more than minutes to plop that tableau over there.
Yes, we only had the Fehlberg 78. Not anymore though
https://github.com/JuliaLang/ODE.jl/pull/101, thanks!
>> A few more comments in-line below. Cheers! Mauro
&
st to
just have your own package(s). However, if you code up more ODE/DAE
solvers, it would be great if those are usable without all the machinery
of DifferentialEquations.jl and if they eventually make into ODE.jl (or
some other "standard" ODE package).
A few more comments in-line below.
s put in.
>
> Also I love your work especially mauro :)
>
> Anyway back to lurking.
>
> Gabriel
On Wed, 2016-06-08 at 19:11, digxx wrote:
> Since Im not really up to date can anyone in 2 sentences explain to me what
> the
> issue with the package ODE.jl is?
> Is it the interface ppl dont like or what makes it so "redundant"?
The issue is that ODE.jl has not moved quite at the pace many oth
On Wed, 2016-06-08 at 18:50, Gabriel Gellner wrote:
> I absolutely agree in general. I am terrified when julia code gets to fancy :)
> I am largely a bear of little brain... (thos ODE.jl choice to send back array
> of arrays kind of breaks this feeling for simplicity ... having to learn to do
> hc
On Wed, 2016-06-08 at 16:36, Gabriel Gellner wrote:
> So much great news in this thread! I am crazy happy that ODE.jl is not dead.
> As
> an interested outsider it seemed like the community got gridlocked on the API
> discussion. It is nice that this is not the case.
I think it was more a case o
On Wed, 2016-06-08 at 12:02, Dupont wrote:
> Thank you, that is a nice suggestion. I will try to wrap RETARD and RADAR.
>
> However, the structure of these fortran code seems much simpler than the
> one I linked above which has kinda of a classe structure. Any idea in this
> case?
Are you aware o
g Jacobians yet, but if that it planned
coloring might be of interest:
https://github.com/mauro3/MatrixColorings.jl Again, this has gone a
bit stale (together with my PR
https://github.com/JuliaLang/ODE.jl/pull/72 for which I made it) but I
would be interested to revive it.
Cheers,
Mauro
&
On Wed, 2016-06-08 at 11:37, Patrick Kofod Mogensen
wrote:
> But that is exactly what Forgy's code does
>
> expression && do_something
Problem with this is that it is a bit cryptic.
There is this related issue:
https://github.com/JuliaLang/julia/issues/16389
@Anonymous: why don't you post your
Maybe this could give you inspiration:
https://github.com/luchr/ODEInterface.jl
It says in the readme:
"If you want to compile the solvers yourself (perhaps with different
options and/or a different compiler), then just call
ODEInterface.help_solversupport for further informations (help topics)
o
On Tue, 2016-06-07 at 05:47, David Parks wrote:
> Is there hidden logic behind this command that I don't see, or did I bump
> into a genuine bug here? v0.4.5
Are you referring to the random value?
help?> Array
...
Array{T}(dims) constructs an uninitialized dense array with element type T.
di
This was discussed at length on github, have a look there. But
essentially to make it easier to create vectors of vectors.
On Mon, 2016-06-06 at 16:35, K leo wrote:
> Why deprecate array concatenation with "[]" and suggest to use "collect"?
> It requires more typing and makes code less elegant.
On Fri, 2016-06-03 at 21:23, Siyi Deng wrote:
> I am neutral about 1 and 2. But I like suggestion 3.
Note, suggestion 3 is currently valid syntax which is unlikely to go away:
julia> (a, b, c) = [1,2,3]
3-element Array{Int64,1}:
1
2
3
julia> a
1
There is a reason for `->`.
the github-fork as a remote:
git remote add github ...
git checkout my-feature-branch
git push github
Make PR on github.
I hope this helps.
> On Thursday, June 2, 2016 at 11:18:09 PM UTC-7, Mauro wrote:
>>
>> On Fri, 2016-06-03 at 07:58, Chris Rackauckas > > wrote:
&
On Fri, 2016-06-03 at 07:58, Chris Rackauckas wrote:
> I think I will need both versions available, since the majority of the work
> is public, while the private work will tend to sit around longer (i.e.
> waiting to hear back from reviewers). So I'd want to be able to easily work
> with the publi
On Wed, 2016-06-01 at 14:37, DNF wrote:
> Out of curiosity: My understanding has been that type instabilities are
> related to the compiler not being able to predict the types of variables
> based on input types, not variables simply (and predictably) changing types
> during program execution.
>
>
Yes, this is a bug: ranges should behave as vectors in read-only
situations. I suspect that this is on the radar of the devs already as
there is quite a bit of work happening in this area. But still filing a
bug report, if one does not exist yet, is probably the right thing to do.
On Wed, 2016-0
esn't help
>
>
> Le mardi 31 mai 2016 09:49:38 UTC+2, Mauro a écrit :
>>
>> This works on 0.5, where anonymous functions are almost like normal
>> functions now.
>>
>> On Tue, 2016-05-31 at 09:26, Femto Trader > > wrote:
>> > Hello,
&g
This works on 0.5, where anonymous functions are almost like normal
functions now.
On Tue, 2016-05-31 at 09:26, Femto Trader wrote:
> Hello,
>
> I'm trying to define an anonymous function
>
>
> julia> (args...) -> begin
>println("hello anonymous func with args")
>end
> (anonym
It would be great if you can submit a pull request for this. It's easy:
- log in on github
- go to
https://github.com/JuliaLang/julia/blob/master/doc/manual/noteworthy-differences.rst
- click the pencil icon
- edit, when finished a pull request is automatically generated.
- there is some extr
I think you need to define hash for your type too as Set is based on
Dict. Read up here:
http://docs.julialang.org/en/release-0.4/stdlib/collections/?highlight=hash#associative-collections
On Fri, 2016-05-27 at 09:40, Dario Prandi wrote:
> Dear all,
>
> while experimenting with the Set collectio
On Wed, 2016-05-25 at 11:50, DNF wrote:
> Is ::Array{Any, 1} the correct annotation?
>>> hello(v::Vector{Any}) = println("Hello")
>>> hello([2,'a'])
> Hello
>>> hello([2,2])
> ERROR: MethodError: no method matching hello(::Array{Int64,1})
> in eval(::Module, ::Any) at /usr/local/Cellar/julia/HEAD/
I'm not sure I understand you question 100%. As Julia evolves towards a
stable 1.0 version, bits of the language which change in a backward
incompatible way are deprecated over two release cycles: in one release
the old syntax will still work but generate the warning, in the
following release the
It's fine to have several versions of julia installed. The different
version don't share the packages, as you saw in those two directories.
Note that not everything which works on one version, works on the
other. Also the packages may be at different versions.
On Fri, 2016-04-22 at 20:25, Henri
I wrote about this a few days ago:
https://groups.google.com/d/msg/julia-users/jUMu9A3QKQQ/-ZShKvLXAwAJ
It's inner vs outer constructors. Basically you have to pass in the
type as a normal function argument, like e.g. `Array(Int,3)` does, or
use `call` overloading:
julia> Array{Int}(3)
3-element
a string, and b and c are both integers, and then I want the
> constructor to return:
>
> Car{Void, Void, Feature3, Void, Feature5, Feature6}(nothing, nothing, a,
> nothing, b, c)
>
> On Friday, April 15, 2016 at 12:18:56 AM UTC-7, Mauro wrote:
>>
>>
>> On Fr
On Fri, 2016-04-15 at 07:28, Anonymous wrote:
> OP here,
>
> So it looks like the consensus is to use a single type with un-used
> features set to nothing. I've actually been playing around with this
> approach since I posted this question. Here's what I've got:
>
> abstract AbstractCar
>
> abs
Also, note that floats work the same on both 32 and 64 bit machines (and
both default to making Float64). Concerning ints: use Int64 if you need
them for your code to be correct, otherwise use Int. (Maybe best to
just use Int64 to be on the save side?)
This has been discussed on this list before
On Tue, 2016-04-12 at 13:47, Didier Verna wrote:
> Mauro wrote:
>
>> yes, this just binds a function to a variable. This also works:
>>
>> julia> foo() = 1
>> foo (generic function with 1 method)
>>
>> julia> bar = foo
>> foo (generic func
On Tue, 2016-04-12 at 12:21, Didier Verna wrote:
> Mauro wrote:
>
>> On Tue, 2016-04-12 at 11:10, Didier Verna wrote:
>>> Hello,
>>>
>>> I'm wondering if anyone has ever seen an actual use for dynamically
>>> creating a new global variable
Maybe you can be a bit more explicit in what you mean, examples would
help too.
The only bit of the scoping rules which I find a bit questionable is
that functions in a local scope have soft-scope (otherwise they have
hard-scope). This has been discussed on github, search for "nonlocal".
On Tue
On Tue, 2016-04-12 at 11:40, Didier Verna wrote:
> What's the rationale behind making "function" const? Is there a
> performance reason?
Yes, globals need to be const to be fast.
> you can't do
>
> function foo() 0 end
> foo = 10
>
> but you can still change the function's definition (so it
On Tue, 2016-04-12 at 11:10, Didier Verna wrote:
> Hello,
>
> I'm wondering if anyone has ever seen an actual use for dynamically
> creating a new global variable by using the "global" keyword from within
> a local scope?
https://github.com/JuliaLang/julia/blob/6b5a05eb1a029aef93f77b60bb1d745c7
On Tue, 2016-04-12 at 11:03, Didier Verna wrote:
> What is the rationale behind module state being read-only from the outside?
Encapsulation? Seems good to me.
> Is this only be default (i.e., is there a construct to still allow
> writing)?
Use a function
julia> module A
a = 1
m
On Mon, 2016-04-11 at 22:24, Erik Schnetter wrote:
> On Mon, Apr 11, 2016 at 11:07 AM, Simon Danisch wrote:
>> @Christoph: arbitrarily, of course :D Joke aside, it should also use zip for
>> the (keys, values) constructor (like Base does).
>> @tshort:
>> It can have arbitrary isbits & immutables
I think this functionality is missing in Base. But you can help
yourself by adapting the reverse! function:
julia> @less reverse!(collect(1:4))
On Mon, 2016-04-11 at 10:48, Thomas Magnusson
wrote:
> The in place reverse! function works of vectors:
>
> julia> a = collect(1:4);
> julia> reverse!
The poor man's solution: I just manually change to julia-mode and
high-lighting seems to work fine.
On Mon, 2016-04-11 at 09:37, Tamas Papp wrote:
> Hi,
>
> I am just learning about coverage tools, sorry if the question is
> basic. Is there a way to use the coverage information provided by Julia
On Sun, 2016-04-10 at 15:24, Fred wrote:
> That's true ! But why a loop is faster in a function ? :)
Check out:
http://docs.julialang.org/en/release-0.4/manual/performance-tips/#avoid-global-variables
>>
>> I seem to recall that your example loop was not in a function(?) If so,
>> that makes it
> I tested my loop monre than 2 times as it is written in my post and I have
> always the same results. The function Tim Holy posted is much faster, I
> posted the results above :)
I seem to recall that your example loop was not in a function(?) If so,
that makes it lots slower.
>> Probably you
If your array is sorted, as your example suggests, there maybe faster
methods, binary search comes to mind (implemented in searchsorted).
Also, if the array is unsorted but you need to look up many values, it
might be worth sorting it first. Mauro
On Sun, 2016-04-10 at 13:40, Fred wrote:
>
524247
julia> s= symbol(randstring(524247));
julia> s= symbol(randstring(524248));
ERROR: ArgumentError: Symbol length exceeds maximum length
in symbol(::ASCIIString) at ./expr.jl:8
in eval(::Module, ::Any) at ./boot.jl:243
On Sat, 2016-04-09 at 10:52, nael...@ic.ufal.br wrote:
> Hello,
>
> Is
On Thu, 2016-04-07 at 21:27, Lucas de Almeida Carotta
wrote:
> How I make this code works?
>
> function read_matrix( data::DataType=Any, spacing=" " )
> local line::Vector{ data } = Array( data, 1 )
> local matrix::Matix{ data } = Array( Array{ data, 1 }, 1 )
>
> while !eof( STDIN )
>
https://github.com/tbreloff/Plots.jl wraps many of the plotting packages
and thus allows to use all of them with a single syntax. Maybe you
should give that a spin?
On Thu, 2016-04-07 at 20:42, harven wrote:
> Hi, I recently upgraded to the last stable version of julia (4.5).
>
> I noticed that
Use:
foo(x) = nothing
Note, you're suggestion also returns `nothing`.
On Thu, 2016-04-07 at 13:04, Tamas Papp wrote:
> Hi,
>
> What's the most compact form of writing a function in assignment form
> with an empty body? Eg is
>
> foo(x) = begin end
>
> the shortest?
>
> (context: I am using a lo
On Wed, 2016-04-06 at 16:24, Didier Verna wrote:
> I think the section on functions in the user manual should be fixed in
> two places:
>
> - it says "The types of keyword arguments can be made explicit as
> follows" which is misleading because, IIUC, every function parameter
> can have an
On Wed, 2016-04-06 at 16:17, Didier Verna wrote:
> Mauro wrote:
>
>> It's a tuple.
>>
>> foo(1,2)
>> (1,2)
>
> and foo(1,2,3) => (1,2,3) and so on. But I still don't understand :-)
Did you find:
http://docs.julialang.org/en/release-0.4/manual/fu
> Can somebody please explain this to me:
>
> julia> foo(args...) = args
> foo (generic function with 1 method)
>
> foo(1)
> (1,)
>
> i.e., why the trailing comma ?
It's a tuple.
foo(1,2)
(1,2)
I made https://github.com/mauro3/Parameters.jl potentially for your
use-case. So instead of
const g=9.81
const rho=1000.0
pressure(h) = rho*g*h
you write:
using Parameters
@with_kw type Para{R}
g::R=9.81
rho::R=1000.0
end
pressure(h,p::Para) = (@unpack p: g, rho; rho*g*h)
My Traits.jl package hasn't seen much love recently. It should work
fine (within its limitation of being experimental) for 0.4 but I'm not
sure I'll find the time to update it to 0.5 when the time comes.
There is also https://github.com/mauro3/SimpleTraits.jl which is (+/-)
just macro-sugar for "
ind = rows[j]
# perform sparse wizardry...
end
end
> On Friday, April 1, 2016 at 2:03:31 AM UTC-7, Mauro wrote:
>>
>> The reason rowvals exists is to access the vector of row-indices of a
>> CSC-matrix, i.e. one of the internals of CSC, to allow efficient
>> iteration ov
The reason rowvals exists is to access the vector of row-indices of a
CSC-matrix, i.e. one of the internals of CSC, to allow efficient
iteration over the non-zeros. However, there is no equivalent colvals
internal, so there is little reason to do this and even less reason to
encourage it. Conside
Maybe like so:
julia> module Myfunc
export f
f(x) = g(x) * g(x)
function g end
end
julia> using Myfunc
julia> f(4)
ERROR: MethodError: `g` has no method matching g(::Int64)
in f at none:3
julia> Myfunc.g(x) = 2x
g (generic function with 1 method)
julia> f(
I think this is fine and idiomatic
julia> type A{B}
x::Float64
function A(x)
B::Bool # asserts that B is indeed a Bool
new(x)
end
end
julia> A(x, b::Bool) = A{b}(x)
A{B}
julia> A(5, true)
A{true}(5.0)
julia> function dothing(
t; inside helper.jl
>
> function helper()
> do stuff
> return something
> end
>
>
>
> On Wednesday, March 30, 2016 at 1:26:22 PM UTC+1, Christopher Fisher wrote:
>>
>> There might be some cases where defining functions within functions can
>&
In 0.4 it is slower but this is fixed in 0.5. So I think this style is
fine unless you need fast on 0.4 now.
On Tue, 2016-03-29 at 18:31, Evan Fields wrote:
> To keep namespaces clear and to help with code readability, I might like to
> do this:
>
> function mainFunc()
> function helper()
>
> # WAT: A warning about using collect()?
>
> julia> a = [1:3]
> WARNING: [a] concatenation is deprecated; use collect(a) instead
> in depwarn at deprecated.jl:73
> in oldstyle_vcat_warning at
> /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
> in vect at abstractarray
>>>
>>> println("Calling Function C...")
>>> m = number(4.5)
>>> println(m.x)
>>>
>>>
>>> typealias integer Union{number}
>>>
>>> println("integer inherits number ")
>>> println("Entering
intln("Calling Function B...")
> m = number(10)
> println(m.x)
>
> println("integer inherits number Calling Function C...")
> m = integer(5.6)
> println(m.x)
>
> function integer(p::Float64) #Defining Function D
> z = basic()
> z.x = &quo
That interface is still up to debate, see https://github.com/mbauman/Tuples.jl
On Wed, 2016-03-23 at 12:07, Tamas Papp wrote:
> I think I found another way (looking at the source):
>
> length(mytupletype.parameters)
>
> Is this something I can rely on, or some internal API that may change?
>
> Al
hread:https://groups.google.com/forum/#!topic/
> julia-dev/eA4VkFAD-yQ. Still applies today.
>
> On Tue, Mar 22, 2016 at 11:30 AM, kunal singh wrote:
>
>
>
> On Tuesday, March 22, 2016 at 8:43:50 PM UTC+5:30, Mauro wrote:
>
> > Hi
> On Tuesday, March 22, 2016 at 11:00:13 AM UTC-5, Mauro wrote:
>
> I think you can do it with Jupyter notebooks, which also work with R.
>
>
> Are you thinking of the RISE extension (https://github.com/damianavila/
> RISE.git) for Jupyter notebooks?
I couldn't s
I think you can do it with Jupyter notebooks, which also work with R.
On Tue, 2016-03-22 at 16:46, Douglas Bates wrote:
> This issue comes up in various forms from time to time. I will be giving a
> presentation in a few days about mixed-effects models in R and Julia. If it
> was an R-only presen
> Hi Mauro ,
>
> Can you show me any example ?
> I am a beginner in Julia. It would of great help for me.
In Julia the number types are defined here:
https://github.com/JuliaLang/julia/blob/fdbcdf78bf0106e609a8d83b9e896d2d11bae594/base/boot.jl#L156
So there are the abstract type
You can only inherit from abstract types. Also, first defining
type number
...
end
and then
abstract number
is not possible. It cannot be both abstract and concrete. (Also note
that types are by convention Captialized).
So build your hierarchy only with abstract types and make concrete type
>> Can I ask how recent your Julia is. I see this with Julia 0.4 and Julia 0.5
>
> 0.5.0-dev+3106
> I could try 0.4 later.
Yes, that's it. I can see Bill's memory behavior on 0.4.3 (starts at
130MB, goes to ~1.4GB when running doit2) but not on yesterday's 0.5
(starts at 150MB, when running doit2
x27;t know how to
proceed. Whilst I did update the GSOC ODE.jl proposal, there may also
be other suitable mentors. I guess that is something to be discussed.
Cheers,
Mauro
@Ilya: Jorge is a PhD student of the authors of TaylorSeries.jl.
On Fri, 2016-02-26 at 09:21, perez...@gmail.com wrote:
>
> However, could you please explain to me what is involved in updating dict?
> I understand an ObjectIdDict is a hash table whose keys are object ID's.
> But the documentation doesn't tell me how to generate such a key for my
> object, nor what value to insert in the dict when overloading
> deepcop
On Thu, 2016-02-25 at 15:57, J Luis wrote:
> Incidentally, this errors in 0.5 (but works fine in 0.4)
>
> julia> s=0.0;
>
> julia> m=rand(1,1000);
>
> julia> @time for el in m
>s = s + el
>end
> ERROR: UndefVarError: s not defined
> [inlined code] from .\none:2
> in anonymous a
> this is awesome
>
> thanks!
A small word of caution: macros can make it harder for others (or your
future self) to read the code, as essentially each macro introduces a
new keyword. Just something to consider when introducing a macro;
awesome as they are.
> On Wednesday, February 24, 2016 at 3
> I know in F# people encourage Discriminated Unions, what about in Julia?
I would say that Julia does not encourage them, but it is fine to use
them.
> I would like to do the following:
>
> immutable B end
> immutable C end
>
> typealias A Union{B,C}
>
> function A(x::Int)
> if x > 0
>
There is also:
- https://github.com/mbauman/RaggedArrays.jl which is being developed
(I think)
- https://bitbucket.org/maurow/ragged.jl/ which I abandoned. If I pick
it up again, I'll probably use https://github.com/mbauman/RaggedArrays.jl
See also: https://github.com/mbauman/RaggedArrays.jl/
You also need to splat when calling boo. Adding and `@show` helps to see
what's going on:
julia> function foo(a, b, x...)
@show x
boo(x...)
end
foo (generic function with 1 method)
julia> foo(1,2,z...)
x = (3,4)
12
Below does not work as x is a tuple of one tuple, which bec
Concerning exchange rates, this is a good read:
http://www.mathstat.dal.ca/~selinger/accounting/tutorial.html#4
In particular the referenced section.
On Thu, 2016-02-18 at 21:30, Jeffrey Sarnoff wrote:
> I am thinking about how Currencies would fit with software for handling SI
> and other physic
> Sounds very useful! I have a scenario that probably fits... When using
> PyCall I always find myself pressing tab to see what methods are defined on
> a python object:
>
> "obj[:get_something]()["... Crap... Gotta look at the docs...
>
> It would be awesome if you gave a quick how-to for somethin
Actually, Mike, is there a way to sort the API docs? Alphabetical or to
some given order?
On Wed, 2016-02-17 at 17:44, Michael Hatherly wrote:
> Thanks for writing that up Mauro and also the shout-out :) Worth noting
> Mike Innes' important work in getting the docsystem integrated
Mike and Tom, thanks! And yes, the other Mike needs mentioning too, I
updated that footnote.
On Wed, 2016-02-17 at 17:44, Michael Hatherly wrote:
> Thanks for writing that up Mauro and also the shout-out :) Worth noting
> Mike Innes' important work in getting the docsystem integrated
/notes/documenting-a-julia-package.html
(feedback welcome)
Mauro
> I have an instance of a parametric type, is there a canonical way to get
> the parameter values?
> For example I could have some Array{T, d} and want to know whether T is
> Float64 and what its dimension is.
> The only way of doing this I am aware of is writing code like:
>
> dimension{T, dim}(ar
Reported here https://github.com/JuliaLang/julia/issues/15072
On Sat, 2016-02-13 at 22:33, Scott Jones wrote:
> I'm seeing a very strange failure recently (within the last week), where
> running "test/runtests.jl" seems to pass, but running the individual test
> shows
> a very different result.
Here's the issue: https://github.com/JuliaLang/julia/issues/15068
On Sun, 2016-02-14 at 00:49, Jonathan Goldfarb wrote:
> Ah, I do recall reading that thread but didn't make the connection. I thought
> I'd built a version recent enough that it should have already broken due to
> that, but I gue
There are a few things you can do:
- use the Vector and Matrix typealiases
- the definition of those also shows how to do this in general:
typealias Vector{T} Array{T,1}
If it is just a one-off thing for any type:
type A{T,S}
end
test{T}(a::A{T,1}) = -2
test{T}(a::A{T,2}) = 7
test(A{Int,2}()) #
I think this is not possible. Instead use a Vector, append! to that and
then reshape in the end. The reshape should result in a view and not a
copy, thus will be fast.
Mauro
On Sat, 2016-02-13 at 10:51, Vishnu Raj wrote:
> Hi,
>
> I have a three dimensional array (say '
Also at the Julia REPL:
julia> apropos("standard deviation")
randn!
stdm
std
randn
help?> std
search: std stdm STDIN STDOUT STDERR setdiff setdiff! hist2d hist2d! stride
strides StridedArray StridedVector StridedMatrix StridedVecOrMat redirect_stdin
std(v[, reg
Macros only work on syntax but not on values, as you noted in your
post. Here again:
julia> macro test(args...)
@show args
:()
end
julia> @test k[5] u[i]
args = (:(k[5]),:(u[i]))
()
Macros are processed during parsing of the source, no values exists at
that point. Jacob ha
> I am interested in Ordinary Differential Equations package. But when I was
> reading the conversations on the mailing list as well as on GitHub, someone
> mentioned that quite a bit of work has already been done. So I want to know
> the status as well as future prospects of the package ODE.jl . A
> Thank you Mauro, CartesianRange(size(A)) seems to be what I am looking for.
That should automatically be done for you by eachindex. In fact,
eachindex will select the fastest method available for iterating over
all indices. But if you need extras, as described in that blog post of
Tim, t
It works like so:
julia> for i in eachindex(A)
@show A[i]
end
...
I.e. the `i` is to be used as sole index into the array. What `i` is
exactly depends on the type of the array. It's either just a Int or a
`CartesianIndex` has a field `I`. But you should not access `I`
directly
I think this should work. You should file an issue if there is
none yet.
On Thu, 2016-02-11 at 02:18, vish...@stanford.edu wrote:
> You can normally do
>
> z = (1,2,3)
> (a,b,c) = z
>
> and it will unpack things from z into a,b,c.
> However, if you do:
>
> let (a,b,c) = z; a end
>
> it's a synta
rray example shows.
> On Wednesday, February 10, 2016 at 2:38:28 PM UTC-5, Mauro wrote:
>
> `similar` does what you're looking for:
>>
>> ```
>> similar(array, [element_type=eltype(array)], [dims=size(array)])
>>
>> Create an uninitialized mutable array
101 - 200 of 724 matches
Mail list logo