Thanks for the reply.
I assume from mutate you mean not changing type of the sub-variable (e.g
"vstate" above) ? I plan to change the values inside that vector but the
vector itself, both in length and type, will remain constant.
Nitin
On Monday, January 25, 2016 at 10:23:21 PM UTC-8, Yichao
On Tue, Jan 26, 2016 at 12:46 AM, Nitin Arora wrote:
> I have couple of questions ( maybe dumb :-) ) regarding composite types:
>
> 1) For a vector of composite type defined as:
>
> immutable Point{T<:AbstractFloat}
> vstate :: Vector{T} # is a vector of length 6 which will be updated
> during
*Running the following line on Julia 0.4.1:*
*run(pipeline(`julia $path`, stdout=outputfilepath, stderr=errorfilepath))*
*gives the error as follows:*
*ERROR: failed process: Process(`julia '/Users/user/Google
Drive/codefile.jl'`, ProcessExited(1)) [1]*
* in pipeline_error at process.jl:
I've run into the following problem while running a simulation code (of a
differential equation). Because of the nature of the problem, the matrices
are dense. In particular one line of code that runs the backslash operator
gives an OutOfMemory error on one computer but not on another computer
I have couple of questions ( maybe dumb :-) ) regarding composite types:
1) For a vector of composite type defined as:
immutable Point{T<:AbstractFloat}
vstate :: Vector{T} # is a vector of length 6 which will be updated
during code execution
ct :: Vector{T} # is a vector of length 4
I have couple of questions regarding immutable types:
1. For "MyDataVector" data structure like this :
immutable Foo
data1::Vector{Float64}
data1::Vector{Float64}
end
MyDataVector = Array{Foo, 1 }
Is it useful or recommended to use
This is the error I am getting when I run
import ProfileView
ERROR: LoadError: BoundsError: attempt to access 157-element Array{Any,1}:
Symbol
Int8
UInt8
Int16
UInt16
Int32
UInt32
Int64
UInt64
Int128
⋮
24
25
26
27
28
On Mon, Jan 25, 2016 at 8:28 PM, SrAceves wrote:
> Hello,
>
> Is there an equivalent to matlab's "~" (function return dummy)? If not, any
> plans to have one?
https://github.com/JuliaLang/julia/issues/9343
Microsoft is going to release an open source plug-in for Visual Studio that
turns it into an R environment:
https://www.youtube.com/watch?v=Y1_0XN-p3Hs
This is in addition to their existing (excellent) python plugin for VS.
Would be great if we could somehow convince them to add julia suppo
Hello,
Is there an equivalent to matlab's "~" (function return dummy)? If not, any
plans to have one?
I didn't know that you can write
```Julia
type B
i::Int
b(x)=2x
B(x)=new(b(x))
end
```
and thus get a very private function `b`...
-erik
On Mon, Jan 25, 2016 at 7:46 PM, Stefan Karpinski wrote:
> Probably a good idea. But it does lead to the question of what exactly
> should be allo
Probably a good idea. But it does lead to the question of what exactly
should be allowed in type blocks. Obviously method definitions are
necessary, but at least global variable declarations are also sometimes
used.
On Mon, Jan 25, 2016 at 7:39 PM, Tony Kelman wrote:
> Were we going to deprecate
Were we going to deprecate that, or make it an error?
Any code in the type block that doesn't look like a field declaration is
evaluated in the scope of the type block and has the effect of preventing
default constructors from being provided. So X is a zero-field type with no
default constructors.
On Mon, Jan 25, 2016 at 7:00 PM, Erik Schnetter wrot
What does the syntax
```Julia
type X
Int,Int
end
```
do?
The resulting type `X` has a size of 0...
-erik
--
Erik Schnetter
http://www.perimeterinstitute.ca/personal/eschnetter/
You should be able to test this out locally without modifying Cairo.jl.
Your example code is probably close. You'll need to make sure you qualify
everything that's not exported by Cairo.jl. For example, I think you'll
need to use `Cairo._jl_libcairo` instead of `_jl_libcairo`. If
`CairoContext` isn
This posting answered my questions:
http://julialang.org/blog/2013/03/efficient-aggregates/
On Friday, January 22, 2016 at 8:03:18 PM UTC-8, asy...@gmail.com wrote:
>
>
> I'm trying to accomplish understanding what Julia does.
>
> On Friday, January 22, 2016 at 7:13:58 AM UTC-8, Stefan Karpins
In 0.5 you can write this as:
function getindex(A::MyCustomArray, x)
ix = round(Int, x) @boundscheck ix = clamp(ix, 1, length(A)) ...
On Monday, January 25, 2016 at 2:13:41 PM UTC-5, Tomas Lycken wrote:
>
> Interesting read, thanks!
>
> I guess I'll hold off implementing this until 0.5 lands, the
You should test it and decide what to put in it by modifying your own
forked copy of Cairo.jl. This is what's great about open-source; you get to
exactly see and control what impact the changes you want will have before
they get added to the official software.
On Monday, January 25, 2016 at 2:4
I'd like to open a pull request, but I wouldn't know exactly what to put in
it... :) I was wondering whether I could test the syntax of such a new function
first, without actually adding it to the Cairo module. It. It might not be
possible, of course...
If it's also sparse within the band, then you should probably use normal sparse
CSC and call cholmod. If the matrix is dense within the band, then we don't
have types for banded matrices yet but the lapack band cholesky should be
accessible.
Interesting read, thanks!
I guess I'll hold off implementing this until 0.5 lands, then.
// T
On Monday, January 25, 2016 at 7:56:15 PM UTC+1, Yichao Yu wrote:
>
> On Mon, Jan 25, 2016 at 1:49 PM, Tomas Lycken > wrote:
> > On e.g. Arrays, I can index with @inbounds to avoid bounds checking. In
On Mon, Jan 25, 2016 at 1:49 PM, Tomas Lycken wrote:
> On e.g. Arrays, I can index with @inbounds to avoid bounds checking. In my
> own custom type, which also implements getindex, what is the correct way of
> leveraging inbounds?
>
> For example, I have code now that looks something like this:
>
On e.g. Arrays, I can index with @inbounds to avoid bounds checking. In my
own custom type, which also implements getindex, what is the correct way of
leveraging inbounds?
For example, I have code now that looks something like this:
function getindex(A::MyCustomArray, x)
ix = clamp(round(
>
>
> Isn't this what every package developer hopes for? Useful small additions
in line with the original intent. Fork it, improve it and permit the owners
to take it in if they like!I wonder sometimes where to put questions like
this. Why don't you open an issue? (to be clear, I have nothing t
Hello colleague,
i agree, this is missing and should show up in a PR.
Wishing a happy day,
Andreas
I have a problem which involves sparse, banded, symmetric, PD systems.
In particular if A is such a matrix and A=LL' I need to solve L' x = z. The
size of A prohibits using full matrices.
So I am looking for advice on tactics for this problem, as there doesn't
seem to be an out-of-the-box solu
Does anyone know of a wrapper of the Keras library in Julia?
I noticed that Cairo offers a function called `cairo_paint_with_alpha`,
that accompanies `cairo_paint`,
(http://cairographics.org/manual/cairo-cairo-t.html#cairo-paint).
At present Julia's Cairo.jl doesn't seem to have this defined. Is it
possible to test it out by defining it using `ccall`, bu
We have an alternate implementation at gonum that's BSD.
https://godoc.org/github.com/gonum/optimize#NelderMead
Should be pretty easy to wrap your function through command line calls. I'm
happy to help if you'd like it.
On Monday, January 25, 2016 at 3:39:16 AM UTC-7, Tim Holy wrote:
>
> If you
In Julia, variables have types, and the compiler uses this information
to generate optimized code. The Python pattern of adding a variable or
field at run-time is thus uncommon in Julia.
A straightforward translation of the Python pattern would be to use a
dictionary. (In Python, objects are impli
What is the type of xmlString? Is it a C string? I.e. a NUL-terminated
char* pointer? If so, that code is going to crash very quickly.
On Mon, Jan 25, 2016 at 10:32 AM, Ján Adamčák wrote:
> Thanks.
>
> My first idea use demo function println(x::UTF8String) at julia side:
>
> jl_function_t *func
Thanks.
My first idea use demo function println(x::UTF8String) at julia side:
jl_function_t *func = jl_get_function(jl_base_module, "println");
jl_call1(func, (jl_value_t*) xmlString);
but in my second idea i plan return UTF8String back to C/C#...
jl_function_t *func = jl_get_function(jl_curr
The algorithm was fine, the issue was that sampling from a range of
integers was heavily optimized for the case of sampling repeatedly from the
same interval, rather than from different intervals. Since the Fisher-Yates
shuffle changes the interval for every sample, it was effectively a worst
case
Wrapping the array of bytes in a UTF8String object should do it. It's not
quite clear what you mean by "transfer".
On Monday, January 25, 2016, Ján Adamčák wrote:
> Hi guys,
>
> Have you any idea, how to transfer utf8 string from C/C# code to Julia
> code?
>
> I tried to find it in manual page
>
Hi guys,
Have you any idea, how to transfer utf8 string from C/C# code to Julia
code?
I tried to find it in manual
page http://docs.julialang.org/en/latest/manual/embedding/
but I haven't any information
Thanks for your help ;)
Ok so basically what I want to do is impossible.
I could remove the encapsulation inside the main() function I guess, but
it's not ideal either.
On Mon, Jan 25, 2016 at 9:06 AM, wrote:
> Yes but ideally I don't want the user to be forced to define this variable
> in the files that are to be loaded. The less the better :)
Just to be clear, `include` and `eval` all works in global scope and
you can't add a local variable at runtime.
>
> L
Yes but ideally I don't want the user to be forced to define this variable
in the files that are to be loaded. The less the better :)
Le lundi 25 janvier 2016 14:41:42 UTC+1, Milan Bouchet-Valat a écrit :
>
> you could always define x, but make it a Nullable so that it doesn't
> necessarily cont
I have a function main() in which I encapsulate my code, notably to use the
@time macro, inside this main() I include files that load data from files
to simulate some models that use a specific syntax (a variable p is defined
for parameters of the model, etc.) and there are some models for which
Le lundi 25 janvier 2016 à 05:24 -0800, amik...@gmail.com a écrit :
> Hi,
>
> I'd like this code:
>
>
> function f1()
> x = 1
> if !isdefined(:x)
> x = 2
> end
> println(x)
> end
>
> function f2()
> if !isdefined(:x)
> x = 2
> end
> println(x)
> end
>
Hi,
I'd like this code:
function f1()
x = 1
if !isdefined(:x)
x = 2
end
println(x)
end
function f2()
if !isdefined(:x)
x = 2
end
println(x)
end
f1() # prints 2, ideally should print 1
f2() # prints 2, ideally should print 2
ideally to print:
1
The error is correct, as this file is neither encoded in ASCII nor in
Unicode: it's in ISO-8859-15.
If you really want to read it an preserve the ° signs, you can use my
to-be-published-soon StringEncodings.jl package:
Pkg.clone("https://github.com/nalimilan/StringEncodings.jl.git";)
using String
It would be easy to do this using the MPI.jl package. That's what I would
do, but only because I'm familiar with how it works. The native parallel
methods of Julia may work just as well, though.
On Saturday, January 23, 2016 at 5:08:11 AM UTC+1, Ritchie Lee wrote:
>
> Let's say I have 10 julia s
If you think there's a bug, one thing you can do is compare Julia's
implementation to another implementation for the same problem and same
starting point. You have to be careful not to read code that has an
incompatible license (either proprietary or GPL), or you become "tainted" and
can't cont
How did you verify that? Or are you guessing? Did you @show the iteration
counter's increment? If not, how do you know it starts high?
On Sunday, January 24, 2016 at 7:45:48 PM UTC+1, grande...@gmail.com wrote:
>
> thanks but that s not the issue. for some reasons. the number of
> iterations is
Hello Tomas,
I tried to run
f = open(filename)
f_bytes = readbytes(f)
text = UTF8String(f_bytes)
but i get the same error I got for
f = open(filename)
text = readall(f)
Thank you for the reply,
Alberto
Il giorno lunedì 25 gennaio 2016 07:00:45 UTC+1, Tomas Lycken ha scritto:
>
> Try conv
47 matches
Mail list logo