I wonder if you are aware of
https://github.com/svaksha/Julia.jl/blob/master/Resources.md#cookbooks
and in particular
https://en.wikibooks.org/wiki/Introducing_Julia
(Also, Packt is coming out with a Julia Cookbook:
https://www.packtpub.com/application-development/julia-cookbook )
It seems tha
In this specific instance, it is worse: searching for "julia cookbook"
or "julia recipes" leads you to the work of Juila Child. "julia -child"
etc is only marginally better, there are apperently many cookbook
authors with the first name Julia.
Searching within Wikibooks and similar (Github) works
A necessary ingredient for success is that a language is created by
people who have specific and clear ideas about what they want from a new
language [1], _and_ have the expertise to implement them. Everyone wants
a fast, extensible, conscise, safe etc language [insert favorite
features here], but
Hi,
I have a dataset of many (about 30 million) observations of the type
Tuple{Person, Array{DataA,1}, Array{DataB,1}}
where
immutable Person # simplified
id::Int32
female::Bool
age::Int8
end
immutable DataA
startdate::Int32
enddate::Int32
type::Int8
extra:UInt8
end
and DataB is
For example, I want
collect_ragged(countfrom(1), [2,3,4])
to return
3-element Array{Any,1}:
[1,2]
[3,4,5]
[6,7,8,9]
I implemented it as
function collect_ragged(iterator, lengths)
result = Vector(length(lengths))
s = start(iterator)
for (i,l) in enumerate(lengths)
v
I suppose you are aware of
http://docs.julialang.org/en/release-0.5/manual/noteworthy-differences/#noteworthy-differences-from-matlab
On Wed, Oct 19 2016, zamani wrote:
> Hi guys .. using Julia is fun ..
> I'm going to write a guide for matlab users specially students but i need
> some help wit
And the same goes for the closely related .1 syntax.
Perhaps you could create an issue, if there isn't one already?
On Wed, Oct 19 2016, Krisztián Pintér wrote:
> i know i shouldn't, but i'm kinda angry at this "1." notation. saving one
> character really worth losing readability? also leading t
Is there a way to make
parse(Int, " - 42 ")
throw an error, or substitute with a different function that does this?
Note that I am not advocating that this should be invalid syntax, just
want to have a "strict" version for reading a dataset that throws an
error unless the integer is not of the "
import DataFrames
const DF = DataFrames
DF.@data ... etc
On Mon, Oct 24 2016, novatena2...@gmail.com wrote:
> Hello,
>
> is there an official way to using a module but with different name (not the
> name of the module), like "import numpy as np".
>
> Currently, I can do that with a hack, like th
I have a type which contains two slots, and it is important that the
types of them satisfy certain constraints. I can enforce that in the
constructor: see first and second implementations below. However, if I
want to compute types directly in the definition (see third
implementation), I end up with
Not too complicated: you can either extract from the Expr, or parse the
tokens iterating over
(token, position) = parse(string, position, greedy = false)
and validate. The only tricky part is the signs.
On Sat, Oct 29 2016, Jérémy Béjanin wrote:
> How easy would it be to make one assuming the s
Is there a general recommendation for dealing with the case when a
function encounters two arrays with different index sets? Eg
OffsetArray(1:5,1:5) + OffsetArray(1:5, -2:2)
currently gives a DimensionMismatch exception via promote_shape, so
perhaps one should simply rely on what the latter does.
eter, require a more
capable terminal. You get completion and other extras of the Julia REPL
for free.
You can find it at
https://github.com/tpapp/julia-repl
If there is interest, I would be happy to submit it to MELPA, just file
an issue.
Best,
Tamas Papp
This is a conceptual question. Consider the following (extremely
stylized, but self-contained) code
parsefield{T <: Real}(::Type{T}, string) = parse(T, string)
function parserow(schema, strings)
# keep i for reporting column, currently not used
[parsefield(T, string) for (i, (T, string))
On Wed, Nov 02 2016, David van Leeuwen wrote:
> I'd be interested to know what the supposed workflow for
> $interpretor-in-$editor is. (This may be more general than emacs
> julia-repl)
>
> I've tried Julia, R in Atom, Emacs, and I don't seem to be able to work
> with it. In the Julia / R / bash
On Wed, Nov 02 2016, Angel de Vicente wrote:
> Hi,
>
> Tamas Papp writes:
>> Hi Julia & Emacs users,
>
> I'm one of those :-)
>
>> I wrote a minor mode for starting and interacting with a Julia REPL from
>> Emacs. It basically uses term, and defers to
{String}}}) at
> ./:0
> in collect_to!(::Array{Int64,1},
> ::Base.Generator{Enumerate{Base.Zip2{Array{DataType,1},Array{SubString{String},1}}},##1#2},
> ::Int64, ::Tuple{Int64,Tuple{Int64,Int64}}) at ./array.jl:340
> in
> collect(::Base.Generator{Enumerate{Base.Zip2{Array{DataT
oid SubString results, if it matters
>># then split the rows on ';' and convert to ?Float64 with NaN for error
>> or ?Nullable Ints
>># and put the values in a matrix, processing the matrix you have the
>> rows and cols
>> ```
>>
>>
>> O
What does the term "type piracy" mean?
The term shows up in julia-related discussions, mostly on
Github. Googling for it leads back these discussions, and a lot of
unrelated stuff about copyright and/or typefaces.
(Apologies if the term is well-known, I am an economist, not a computer
scientist).
end
test_file = """
1;2;3
4;5;6
7;error;9
"""
parsefile(IOBuffer(test_file), fill(Int, 3))
I still need to figure out type stability etc, but I think I am on the
right track.
[1] http://joeduffyblog.com/2016/02/07/the-error-model/
On Thu, Nov 03 2016, Tamas Papp wrote:
>
Hi,
I am working on a parsing framework where the parsing functions either
return a parsed value, or in case they could not parse, return a value
that signals this -- similar to Base.tryparse.
Originally I was using a Nullable{T}, but realize that in case I could
not parse then having the raw str
myexpression{T <: Integer}(a::T) = myexpression(convert(Int128, a))
# You can also define for BigInt, depending on the range you will need
# for `a`. Order is important.
myexpression(a::Int128) = a*((a+12)*(a+24)*(a+36)*(a+48))
julia> myexpression(16140)
1103425489430061096960
On Sat, Nov 05 201
You need to open a terminal.
However, given that the repo is 5 months old, and there has been a new
Julia release, and Mamba.jl was also updated in the meantime, the code
may need some work (impossible to say without running it), which would
require learning a bit about programming.
On Sun, Nov 0
See quit(), and in general exit(code).
On Monday, November 7, 2016 at 11:21:14 AM UTC+1, Fred wrote:
>
> Hi,
>
> I search in Julia the equivalent of Perl
> die;
> to stop the execution of a program.
>
> I tried "break" but it produces an error :
> ERROR: LoadError: syntax: break or continue outsi
return
On Fri, Nov 11 2016, Davide wrote:
> Actually, when executing a function in Julia REPL, quit() and exit() also
> exit from julia. Is there a way to stop the function but not Julia?
>
>Thanks
>
> On Monday, November 7, 2016 at 11:40:32 AM UTC+1, Tamas Papp wrote:
>
On Fri, Nov 11 2016, Angel de Vicente wrote:
> Tamas Papp writes:
>
>> return
>
> But return will only quit the current function and return execution to
> the caller. Coming from Fortran, I also miss something like STOP, which
> will stop all execution and return me
On Fri, Nov 11 2016, Angel de Vicente wrote:
> Tamas Papp writes:
>>> But return will only quit the current function and return execution to
>>> the caller. Coming from Fortran, I also miss something like STOP, which
>>> will stop all execution and return me to th
I am using a laptop with a HiDPI display, and the forum works fine -- in
fact, I love the clean design. In firefox, Ctrl+ magnifies correctly,
same in Chromium. Are you using Safari? Perhaps try a different browser.
On Mon, Nov 21 2016, Ferran Mazzanti wrote:
> One thing that is not particular fr
On Tue, Jan 13 2015, Tom Short wrote:
> If you want to try the Sims docs at the REPL, you'll need to checkout that
> package and enter "using Sims, Sims.Lib, Lexicon". Then you can do
> ?Resistor or ?"Capacitor.
>
> Note that the question mark doesn't work in ESS.
Is that an intrinsic limitation
I am still learning about matrices in Julia so I didn't file an issue
becuase I am not sure this is a bug, but in
julia> VERSION
v"0.3.5"
julia> lu = lufact([1 2; 3 4])
LU{Float64,Array{Float64,2}}(2x2 Array{Float64,2}:
3.0 4.0
0.33 0.67,Int32[2,2],0)
julia> typeof(lu[:U])
Array
Hi,
Is there an idiom for ignoring possible multiple values? For example, if
I have a function foo() that may or may not return multiple values where
values after the first one provide some extra information (eg a
condition number on an operation, etc), but I am not necessarily
interested in it --
tempted to allow Triangular to be rectangular
> so actually the triangular matrix would be more a trapezoid. I think it
> could work but would require some efforts. It would also make it it
> possible to use the structures for blocked/paneled factorization algorithm.
>
> 2015-01-15
Hi,
Suppose I have an array with dimensions (m*n, m*n), and I would like to
set certain size (n,n) blocks of this array to contain the same rows
(motivation: the matrix is a continuous-time Markov transition matrix).
What is the idiomatic loopless solution?
I came up with (toy example)
a = zero
Emacs. ESS for Julia is very nice, the only thing I miss is the help
integration, which I guess will be done once 0.4 is released.
Best,
Tamas
On Sat, Jan 17 2015, Terry Seaward wrote:
> Hi,
>
> Just curious to know what people use to write/edit their Julia code
> (os/app)?
C-c C-c works, unless the block has empty lines.
ESS is still a bit quirky, but has improved a lot lately. Use the latest
from melpa.
Best,
Tamas
On Tue, Jan 20 2015, Todd Leo wrote:
> To Emacs users:
>
> Is ESS smart enough, that one can send the whole code block to REPL where
> the cursor
Hi,
I am wondering what the best workflow is for iterative/exploratory
programming (as opposed to, say, library development). I feel that my
questions below all have solutions, it's just that I am not experienced
enough in Julia to figure them out.
The way I have been doing it so far:
1. open a
Suppose I have a trivial module
module Foo
x = 1
end
so names(Foo) now includes a Symbol that is === to symbol("x"). I have
two questions:
1. How can I intern symbols into a module programatically, possibly from
outside the module? symbol("Foo.y") does not work (using 3.5).
2. Similarly, how ca
e issues a) and b). I often maintain a script as
>> part of my iterative/exploratory work, so that I can easily get to the
>> desired state when I have to restart.
>>
>> -viral
>>
>> On Tuesday, January 20, 2015 at 4:15:13 PM UTC+5:30, Tamas Papp wrote:
>>
> new names to an already-closed module.
> - Anything that has already been compiled and uses myfunction won't "hear"
> about the new definition unless you reload the whole module (see issue #265).
>
> --Tim
>
>
> On Monday, January 26, 2015 02:54:03 PM Tamas Papp wrote:
n modify things without recompiling everything. It would be a
> great feature if the REPL was able to "step into" modules other than Main
> so that everyone can use this)
>
> On 26 January 2015 at 14:54, Tamas Papp wrote:
>
>> So the only the global name space is for
expression directly. from there, you can explore the resulting Expr tree
> with dump() and Meta.show_sexpr() to observe the correct expression tree.
>
> you can convert symbols to values with eval() or getfield()
>
>
> On Mon Jan 26 2015 at 8:16:20 AM Tamas Papp wrote:
>
>> Su
I don't think Steven's view is unfriendly per
se. Documentation/organization is hard, and saying that some other
projects did not do it perfectly either is not a slur on anyone's work.
I tend to agree with Steven's opinion: very few R packages have
vignettes (although the good quality ones do), an
I think that LAPACK error codes above 0 are about ill-conditioning
and/or non-convergence. Perhaps you could share the matrix (in a binary
format, since copy-pasting decimal floats can change the values and
thus the conditioning).
Best,
Tamas
On Fri, Jan 30 2015, Steven Sagaert wrote:
> when d
Perhaps
setdiff(a, b)
or
a[indexin(a, b) .== 0]
I don't know which is faster, for small arrays it should not matter.
Best,
Tamas
On Mon, Feb 02 2015, paul analyst wrote:
> How to make vector 'c' such that they are the values of the vector "a" but not
> in the vector "b"?
>
> (Excluding the
Eg
function range_end(a,step,b)
v = a:step:b
if v[end] != b
v = [v,b]
end
v
end
[1 4 ... ] is not a vector, but a matrix. You will need to transpose the
result if you want that. Also, if the range does not need to be
extended, it is left as is, should work fine in most applications, b
1:3:18060001
>
> Paul
>
> W dniu wtorek, 3 lutego 2015 14:08:57 UTC+1 użytkownik Tamas Papp napisał:
>>
>> Eg
>>
>> function range_end(a,step,b)
>> v = a:step:b
>> if v[end] != b
>> v = [v,b]
>> end
>> v
>> en
diff([1, 2, 4, 7, 8])
I don't think it gets more beautiful than this :D
Best,
Tamas
On Sat, Feb 07 2015, Evan Pu wrote:
> say I want to compute a pair-wise diff for all the elements in the array.
> input:[1, 2, 4, 7, 8]
> output:[1, 2, 3, 1]
>
> is there some kind of "beautifu
I think that this is an excellent idea, and I would argue for making
this color scheme default for all plotting libraries, for displaying
continuous data mapped to colors.
I have not been aware of CUBEHELIX, but I have always felt bad about
color-blind people in an audience, especially students in
Hi,
Is there a macro in Julia similar to CL's WITH-SLOTS? Eg
type Foo
bar
baz
end
function foo(f::Foo)
@with_fields f (bar,baz)
bar+baz
end
end
would be the same as
function foo(f::Foo)
f.bar + f.baz
end
If not, then some hints on how to write this would be welcome. I could
not
Hmmm, did you read the whole file? After getting through the
preliminaries, it starts with dynamic programming, and discusses
economics problems. It looks like it follows the spirit of the
Sargent-Ljungqvist book quite closely.
On Wed, Feb 11 2015, Andreas Lobinger wrote:
> 1) is it julia 0.3 or
Hi,
I am trying to gain a better understanding of modules, and especially
`using` and `import`, and module redefinition.
Suppose I have
--8<---cut here---start->8---
module Foo
export bar, baz
function bar(x)
:something
end
baz = 42
end
--8<-
On Thu, Feb 12 2015, jung.fe...@gmail.com wrote:
> Hi,
>
> I've run into a problem that I hadn't even considered so far. When
> computing the analytical solution to a positive integral (its an
> integral over a quadratic function) I got extremely negative values
> from Julia. Here is some example
Hi,
I thought that using modules would solve my problems with iterative
development, but apparently not: when reloading a module that was used
in Main, conflicts mask the new definitions.
Eg
--8<---cut here---start->8---
module Foo
export Bar, baz
type Bar
x
Is this a bug, or am I missing something obvious?
julia> versioninfo()
Julia Version 0.3.5
Platform Info:
System: Linux (x86_64-linux-gnu)
CPU: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
WORD_SIZE: 64
BLAS: libblas
LAPACK: liblapack
LIBM: libopenlibm
LLVM: libLLVM-3.5
julia> A
3x5 s
by the module name (Foo.baz() rather
> than baz()), then you will be fine. Or use the workspace command.
>
> http://docs.julialang.org/en/latest/manual/workflow-tips/#a-basic-editor-repl-workflow
>
> --Tim
>
> On Wednesday, February 18, 2015 09:53:24 AM Tamas Papp wrote:
>
-1820~ubuntu14.10.1. So now I am using the ubuntu version.
If this is not known to be fixed, maybe worth adding to the test suite.
Best,
Tamas
On Wed, Feb 18 2015, Andreas Noack wrote:
> I'm unable to reproduce this on 0.3.5, 0.3.7pre or master. How did you
> construct A?
>
>
BTW, what is this Val{} construct? I noticed it in the nighly builds (eg
for lufact with no pivoting), but could not find it in the docs.
Tamas
On Wed, Feb 18 2015, Tim Holy wrote:
> I'm fairly certain you can solve this with a stagedfunction and
> Val{:fieldname}. Left as an exercise for the
Great! This is effectively like an EQL specializer in CLOS, isn't it?
(Only a bit neater conceptually.)
On Wed, Feb 18 2015, Tim Holy wrote:
> On Wednesday, February 18, 2015 04:51:44 PM Tamas Papp wrote:
>> BTW, what is this Val{} construct? I noticed it in the nighly builds (eg
Hi,
Maybe you could use value types (
http://julia.readthedocs.org/en/latest/manual/types/#value-types ),
however, you need to use the latest nighly builds for that. Eg
func(::Type{Val{1}}, x) = x^2
func(::Type{Val{2}}, x) = sin(x)
func(Val{1},1) # => 1
func(Val{2},1)
You could create an array pool:
arraypool = Dict()
function emptyarray(elttype, dimensions...)
get!(() -> Array(elttype, dimensions...), arraypool, (elttype,
dimensions))
end
When you request the same kind of array, it will recycle a preallocated one:
a = emptyarray(Float64, 1, 2, 3)
is(a, e
be negligible. YMMV of course, but it would be interesting
to see a nontrivial example where allocation is a significant main cost
--- allocating un-initialized arrays (with Array) should be fairly
cheap.
Best,
Tamas
On Fri, Feb 20 2015, Tamas Papp wrote:
> You could create an array p
Hi,
Can you clarify what you want to achieve with this? I don't understand
the problem (what are the doubts?). BTW, arguments after the ; are
*keyword* arguments in Julia, *optional* arguments are a different
kettle of fish. See
http://docs.julialang.org/en/release-0.3/manual/functions/#optional-
For example,
parsefloat(filter(c->c!=',', "123,456"))
Best,
Tamas
On Sun, Feb 22 2015, AVF wrote:
> What is the best way to convert a string such as "123,456" into a float
> 123456.0? I could not find a method that would splice out a character from
> the middle of a string to feed the result
Hi John,
In fact you can eval "into" a module and thus add functions/variables
without reloading the whole thing. Juno supports this, I am working on
ESS to provide the same functionality. What IDE are you using?
Best,
Tamas
On Wed, Feb 25 2015, lapeyre.math1...@gmail.com wrote:
> I found a so
, lapeyre.math1...@gmail.com wrote:
> I guess you mean using the module's eval to add functions/variables ? This
> sounds like an excellent
> option.
>
> I am using emacs/julia mode + konsole.
>
> On Wednesday, February 25, 2015 at 11:39:31 AM UTC+1, Tamas Papp wrote:
>
ESS _does_ support Julia at the moment:
1. editing Julia code works fine, even though the aforementioned commit
from Wilfred Hughes will improve it and will also make it easier to
follow improvements in julia-mode,
2. interacting with the REPL is functional, but does not support all the
extras I
Hi,
I am solving some economic models in Julia. I have vectors that describe
various moments, for some data and then for a bunch of models. I would
like to export them to LaTeX, and if possible to ASCCI like org-mode.
| moment | data | model1 | model2 | ... |
|--+--++---
I am afraid you are missing something fundamental here.
Those double quotes are not part of the strings, they are just a
printing convention that Julia uses (which coincides with the read
syntax).
Similarly,
julia> print([1,2,3])
[1,2,3]
even though the array has no elements [ or ], not even ',
did you see
> https://github.com/scheinerman/LatexPrint.jl?
>
> Am 28.02.2015 um 10:52 schrieb Tamas Papp :
>
>> Hi,
>>
>> I am solving some economic models in Julia. I have vectors that describe
>> various moments, for some data and then for a bunch of models.
Looks interesting, but is there a way to get a preview of more than a few
pages? An example chapter somewhere in the middle would be nice. The
preview window on the website throws me out after a few pages, so I could
not really look into the book.
On Tuesday, March 3, 2015 at 12:14:58 PM UTC+1,
In some cases a composite type may allow you to organize your code
better. For example, I would usually prefer
type BodyMetrics
weight::Float64
height::Float64
waist::Float64
end
to a Vector[3] because I would be concerned that I would mix up the
order of fields without explicitly specifyin
Assuming that you want to fill it with a sequence of integers as your
examples suggest, something like
[i for i=1:3, j=1]
or
reshape(1:3,3,1)
would also work.
Best,
Tamas
On Wed, Mar 04 2015, Deniz Yuret wrote:
> Is there a way to initialize a 2D column matrix?
> a=[1,2,3] gives me a 1D ve
feel free to discuss the need for a convenient syntax for this
> at https://github.com/JuliaLang/julia/issues/10338
>
> Op woensdag 4 maart 2015 10:32:12 UTC+1 schreef Tamas Papp:
>>
>> Assuming that you want to fill it with a sequence of integers as your
>> examples sug
Even outside stats, Julia is a moving target, with nontrivial changes in
syntax and semantics in the core language, and large changes in library
code.
While this is natural (and beneficial) in a new language, one has to
have a preference for other benefits (eg the clarity and the design of
the lan
Maybe something like
function mysplit(s)
a = split(s, "string1")
b = split(a[2], "string2")
c = split(b[2], "string3")
(b[1],c[1])
end
julia> s = "string1[10-15 characters]string2[string I need to
extract]string3"
julia> mysplit(s)
("[10-15 characters]","[string I need to extract]")
HTH
Sorry, then I misunderstood. In that case, regular expressions are
probably your best option.
HTH,
Tamas
On Wed, Mar 04 2015, Nils Gudat wrote:
> Hi Tamas,
>
> Not sure I'm correct, but I think what you're suggesting won't work, as I
> can't split by string2 separately - I only want to find s
If I have a composite type
type Foo
a
b
c
end
I can initialize it with a vector like this:
x = Foo([1,2,3]...)
But how can I get the fields as a vector, eg [x.a,x.b,x.c] without
enumerating them? convert(x, Vector) does not work.
I need this to go back and forth between the type and the
:length(names(Foo))]
>
>
> Am Donnerstag, 5. März 2015 10:51:36 UTC+1 schrieb Tamas Papp:
>>
>> If I have a composite type
>>
>> type Foo
>> a
>> b
>> c
>> end
>>
>> I can initialize it with a vector like this:
>>
On Thu, Mar 05 2015, Christoph Ortner wrote:
> I like Juno and I think ESS is ok, but I would call neither "mature", e.g.,
> missing debugger, profiling is not built-in, auto-complete is far from
> perfect and getting help text in the editor does not work consistently
> either. And finally breaki
I know some colleagues who are specifically waiting for the debugger to
improve before adapting Julia, especially for teaching, so these things
can be a deal-breaker for some people, even if the core is stable.
I can easily live with the changes in the core language --- where I
would like to see s
I wish Julia issued a warning in this case -- maybe there is an issue
about this, but I could not find it.
Tamas
On Wed, Mar 11 2015, Yuuki Soho wrote:
> I think Julia implicitly assume that i is a global variable, i.e. your
> function is equivalent to
>
> f = () -> begin
> global i
> re
Hi Charles,
Array{String} is a type, not an array:
julia> isa(Array{String}, Type)
true
julia> typeof(Array{String})
DataType
See http://docs.julialang.org/en/release-0.3/manual/types/ .
The function Array(eltype, dimensions...) can be used to instantiate an
object of this type, which is the c
On Thu, Mar 12 2015, Ivar Nesje wrote:
>>
>> So, what you would want to do is `Array{String,1}()`.
>> That ought to construct a array of strings with dimension 1 but doesn't.
>
>
> But in 0.4 you can use Array{String,1}(0) to create a 1d array with 0
> elements. Note that you have to provide the
IMO there is no way to ensure that a new language like Julia will live
(= have a viable, active community which keeps improving the language
and the libraries) over a 5-year timeframe. I really hope it will, but
there is no way to be sure.
That said, since it is open source, the client will always
(defun customize-julia ()
;; also put other Julia customizations here
(interactive)
(setq julia-basic-offset 2))
(add-hook 'julia-mode-hook 'customize-julia)
BTW, I am working on ESS & Julia repl interaction, you might find this
useful (will be merged eventually I hope):
https://github.com
My mental model is that
x[:] += 1
is turned into
x[:] = x[:] + 1
which is equivalent to
x[:] = x + 1
which then is turned into a setindex! call. See
http://docs.julialang.org/en/release-0.3/manual/arrays/#assignment
I don't know if the last step is accessible to the user (for
metaprogramming
att Bauman wrote:
> On Saturday, March 14, 2015 at 9:15:32 AM UTC-4, Tamas Papp wrote:
>
> I don't know if the last step is accessible to the user (for
> metaprogramming), would be interesting to learn about that.
>
>
> Here you go:
>
> julia> expand(pa
I think that in 0.4, => is not merely syntax, but a constructor for a
Pair. So you can do
julia> [Pair(i,2*i) for i = 1:3]
3-element Array{Pair{Int64,Int64},1}:
1=>2
2=>4
3=>6
and using the => is just syntactic sugar.
My understanding that [1=>2, 3=>4] is deprecated because it will
eventually
Hi,
Can someone point me to some Julia code that calculates a matrix for the
derivatives of the Chebyshev polynomials T_j, at given values, ie
d^k T_i(x_j) / dx^kfor i=1,..n, j for some and vector x.
The Chebyshev polynomials themselves are very easy to calculate using
the recurrence relatio
Hi,
Suppose I have a function that maps an atom of type T, eg Float64, into
Vector{T}, and takes another argument n that determines its length.
What is the idiomatic/fast way of collecting the values in the columns
of a matrix?
Currently I am using this:
@doc """Map elements of `x` into columns
Hi,
I am looking for a function (library) that allows evaluation of a B-spline
basis (specified by the knots and the order), at given points, _and_
also allows the evaluation of derivatives for the same family. R's
splineDesign in the splines package has this, but looking at the splines
libraries
.jl
>
> https://docs.scipy.org/doc/scipy-0.15.1/reference/interpolate.html
> (use with PyCall)
>
> https://github.com/lgautier/Rif.jl
> (R and Julia Interfacing)
>
> On Sunday, April 5, 2015 at 12:57:28 AM UTC+5:30, Tamas Papp wrote:
>>
>> Hi,
>>
>> I am look
oefficients in Dierckx with `get_coeffs(spl)`
> where `spl` is a Spline1D object. Or look into the internals here:
> https://github.com/kbarbary/Dierckx.jl/blob/master/src/Dierckx.jl#L83 .
>
> - Kyle
>
> On Sat, Apr 4, 2015 at 12:54 PM, Tamas Papp wrote:
>
>> I have looked a
continue
>>> end
>>> D[i, j] = 2*(j-1)/(b-a)
>>> else
>>> if j < i || iseven(i+j)
>>> continue
>>> end
>>> D[i, j] = 4*(j-1)/(b-a)
>>>
I am trying to write a simple utility that opens the readme of a package
in my browser:
@doc "Open readme of package in browser."->
function Pkgreadme(package)
file = Pkg.dir(package) * "/" * "README.md"
isfile(file) && `x-www-browser $(file)`
end
but get the error
ERROR: UndefVarError: file
I would find a blog with an RSS feed more practical --- I prefer not to
receive largish HTML e-mails, but leave stuff unread in my RSS reader
until I have the time to work through it.
Best,
Tamas
On Sun, Apr 12 2015, Zahirul ALAM wrote:
> I want to start a Julia newsletter. At this moment it w
Hi,
I had some code like
if isa(spec, Symbol)
A[i,spec] = 1
elseif isa(spec, Vector{(Symbol,Float64)})
@assert(isapprox(sum(map(x -> x[2],spec)),1))
for (obs,prob) = spec
A[i,obs] = prob
end
else
error("don't know how to parse $spec for aggregatio
Hi,
I have been following issue 7128 [1] and the related other issues, and
noticed that constructs like [1,2,[3,4]] give a warning in the dev
version I am using at the moment (v"0.4.0-dev+4219"), but I am wondering
if there is a construct that I can use for non-concatenating vector
creation _at th
Thanks. Is there a "local" solution that does not interfere with the
namespace?
Best,
Tamas
On Mon, Apr 13 2015, Toivo Henningsson wrote:
> You could make a typealias with a type parameter T for your type and check
> against that with isa.
fter the
> concatenation change is applied.
>
> julia> Any[1,2,[3,4]]
> 3-element Array{Any,1}:
> 1
> 2
> [3,4]
>
>
> On Monday, April 13, 2015 at 8:55:19 AM UTC-4, Tamas Papp wrote:
>>
>> Hi,
>>
>> I have been following issue 7128 [1] and th
1 - 100 of 367 matches
Mail list logo