I 'm somewhat confused about when @async tasks switch.
My understanding was tasks would yield on a blocking operation such as IO.
On 0.4.1, I started multiple workers on remote hosts asynchronously, and
these started as I expected.
Presumably the tasks launching the workers yielded when the
Perhaps you could overwrite the convert function to include a warning.
(Maybe just temporarily until you discover all the conversions)
As an example, this is a quick hack, modified from definition in mpfr.jl
@eval begin
function Base.convert(::Type{BigFloat}, x::Float64)
You can take some inspiration from
DataArrays:
https://github.com/JuliaStats/DataArrays.jl/blob/44192cf6261d6eed476018fb2770c5ca8dc4e9f2/src/operators.jl#L377-L445
There's a link there to a blog post about speeding up R's multiplication —
I've not read it too carefully, but I think that may
Sorry, I was too quick there.
Instead of
>if X has a NaN in row t, then row t is deleted in both X and Y
I wanted to say
if X and/or Y has a NaN in row t, then row t is deleted in both X and Y
/Paul S
On Monday, 18 April 2016 23:35:11 UTC+2, paul.so...@gmail.com wrote:
>
> > In particular,
> In particular, if X and Y contain NaNs in different places...
I meant that if X has a NaN in row t, then row t is deleted in both X and
Y. Example:
X = [1;NaN]
Y = [10;11],
then we redefine as
Xb = [1]
Yb = [10]
and get Xb'Yb = [10]
This is a fairly typical approach in eg. regression
Le lundi 18 avril 2016 à 13:16 -0700, paul.soederl...@gmail.com a
écrit :
> Hi and thanks for the reply.
>
> However, I am not sure that I fully understand
> >NullableArrays are not needed if you only have NaNs
>
> Maybe I have the wrong expectations about NullableArrays, but I hoped
> that it
Hi and thanks for the reply.
However, I am not sure that I fully understand
>NullableArrays are not needed if you only have NaNs
Maybe I have the wrong expectations about NullableArrays, but I hoped that
it would provide a quick "excise": cut out all rows where there is a NaN in
either X or Y
On Monday, April 18, 2016 at 10:38:28 AM UTC-4, Didier Verna wrote:
>
>
> Julia warns you when there's an ambiguity in method specificity, and
> picks one "arbitrarily" (according to the manual). I guess arbitrarily
> doesn't mean random. Is there a particular reason for not
>
Thank you for all answers.
I remembered, that i saw something in the documentation, but i rather
suspected it in Control Flow.
Actually the foo(a,b,c) do x notation i also see as benefit. The foo(a,b,c)
do without argument is leading to the 'wrong' assumptions, code would look
clearer
Le lundi 18 avril 2016 à 07:40 -0700, paul.soederl...@gmail.com a
écrit :
> Hi,
>
> I want to use NullableArrays to facilitate some multivariate
> statistics (NaNs...).
>
> If X is a NullableArray{T,K} and Y is a NullableArray{T,L}, can I do
> X'Y? (My clumsy attempts say no, but I might have
On Mon, Apr 18, 2016 at 12:01 PM, Didier Verna wrote:
> I wrote:
>
>> The manual seems wrong about this (0.4.5):
>>
>> f(a=1,b=2) = a+2b
>> f(a::Int,b::Int) = a-2b
>> f() # -> 5
>> f(1,2) # -> -3
>>
>> The manual says that both calls give -3. So who's wrong, the language
I wrote:
> The manual seems wrong about this (0.4.5):
>
> f(a=1,b=2) = a+2b
> f(a::Int,b::Int) = a-2b
> f() # -> 5
> f(1,2) # -> -3
>
> The manual says that both calls give -3. So who's wrong, the language or
> the manual ?
So it seems that optional arguments /values/ are tied to the
On Mon, Apr 18, 2016 at 11:47 AM, Didier Verna wrote:
>
> The manual seems wrong about this (0.4.5):
>
> f(a=1,b=2) = a+2b
> f(a::Int,b::Int) = a-2b
> f() # -> 5
> f(1,2) # -> -3
>
> The manual says that both calls give -3. So who's wrong, the language or
> the manual ?
Tim Holy wrote:
> Since it's open-source you can check on your own :-). But the short
> answer is:
Yes, but I'm asking here for performance reasons ;-)
Thanks.
--
ELS'16 registration open! http://www.european-lisp-symposium.org
Lisp, Jazz, Aïkido:
I know about the promotion, but this is precisely what I want to avoid. It
might happen that there are hard-coded Float64 constants somewhere in the
code and I would like to locate them and replace with higher precision
ones. I could probably just do a direct search in the source code to
The manual seems wrong about this (0.4.5):
f(a=1,b=2) = a+2b
f(a::Int,b::Int) = a-2b
f() # -> 5
f(1,2) # -> -3
The manual says that both calls give -3. So who's wrong, the language or
the manual ?
--
ELS'16 registration open! http://www.european-lisp-symposium.org
Lisp, Jazz, Aïkido:
Since it's open-source you can check on your own :-). But the short answer is:
- The only support this needs is the Julia language itself. There is no need
to have it in Base (i.e., no disadvantage to having it in a package), nor does
it use any features of julia that aren't there for other
On Monday, April 18, 2016 at 11:03:53 AM UTC-4, Didier Verna wrote:
>
> What I'm actually interested in is how deep in the language
> this needs to be grounded, since I guess this is not based on the
> AbstractArray interface. Does it need to access the language's
> internals ? How's
Adding a BigFloat and a Float64 should automatically promote both to
BigFloats, avoiding precision loss for you.
julia> BigFloat(2.9) + 0.3
3.199900079927783735911361873149871826171875
Do you have a case where this doesn’t happen?
// T
On Monday, April
FixedSizeArrays are stack allocated and FlexibleArrays are just a wrapper
around normal arrays.
On Monday, April 18, 2016 at 5:03:53 PM UTC+2, Didier Verna wrote:
>
> Tim Holy wrote:
>
> > https://github.com/SimonDanisch/FixedSizeArrays.jl and
> >
If you'd like to share that document, it would be a valuable resource for
others as well when trying to help out. It's not unlikely that at least a
subset of the things in your list are things that are present (and perhaps
even quite extensively so) in the documentation, but explained in a way
Tim Holy wrote:
> https://github.com/SimonDanisch/FixedSizeArrays.jl and
> https://github.com/eschnett/FlexibleArrays.jl
Thanks. What I'm actually interested in is how deep in the language
this needs to be grounded, since I guess this is not based on the
AbstractArray
Hi,
I want to use NullableArrays to facilitate some multivariate statistics
(NaNs...).
If X is a NullableArray{T,K} and Y is a NullableArray{T,L}, can I do X'Y?
(My clumsy attempts say no, but I might have missed something.)
Thanks for the help /Paul S
Julia warns you when there's an ambiguity in method specificity, and
picks one "arbitrarily" (according to the manual). I guess arbitrarily
doesn't mean random. Is there a particular reason for not
standardizing a tie-breaker (possibly the one currently in use) ?
--
ELS'16 registration
It works well with a symbol, sorry for the noise. Code:
@assert length(filter(x->contains(x, "hello"), Libdl.dllist())) == 0
hellohdl = Libdl.dlopen("/Users/chappi/_curr/c_und_julia/hello")
hellosym = Libdl.dlsym(hellohdl, :my_main)
@assert length(filter(x->contains(x, "hello"), Libdl.dllist()))
https://github.com/SimonDanisch/FixedSizeArrays.jl and
https://github.com/eschnett/FlexibleArrays.jl
--Tim
On Monday, April 18, 2016 03:55:21 PM Didier Verna wrote:
> Hello,
>
> is there a way to define such a beast? I would like for instance to
> express something like this:
Hi,
I want to make sure I am not loosing any precision in my code by
accidentally mixing BigFloat and Float64 (e.g. adding two numbers of
different precision). I was thinking about replacing the definitions of
`+`, `-`, etc. for BigFloat but if you do that for all two argument
functions this
was curious about this question myself. here is my versioninfo() for a
recent iMac with an i7:
Julia Version 0.4.5
Commit 2ac304d* (2016-03-18 00:58 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin14.5.0)
CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
WORD_SIZE: 64
BLAS:
Hello,
is there a way to define such a beast? I would like for instance to
express something like this: SquareMatrix{Int32,3} and get instances
that would be similar to 3x3 Array{Int32,2}.
Right now, it seems to me that the available array abstractions only let
you express the rank as part of
If performance matters, currently you're going to have to specify the element
type---not for the sake of your `MyType` object, but simply for the efficient
access to elements of c and d. This will change once
https://github.com/JuliaLang/julia/pull/15921 merges. On julia 0.4, you could
write
OK. Thanks!
El lunes, 18 de abril de 2016, 6:52:48 (UTC-4), Scott T escribió:
>
> I don't think this possible at the moment, especially because one needs to
> first read the sheet in order to know what the range is called. You might
> want to open an issue at
I don't think this possible at the moment, especially because one needs to
first read the sheet in order to know what the range is called. You might
want to open an issue at https://github.com/davidanthoff/ExcelReaders.jl
and suggest it.
On Monday, 18 April 2016 05:51:23 UTC+1, Fernando
The PPA version.
On Monday, April 18, 2016 at 9:51:44 AM UTC+5:30, Tony Kelman wrote:
>
> Where is your Julia build from?
Thank you Simon.
I figured out how to fix my issue. I do not know what the underlying reason
is though (but that is less important to me right now)
If I preallocate the vector srt, my timing and allocation problems are
resolved, see the three versions below:
thank you all.
Executing
In Julia this:
function xxx22xx1B(e99y::Array,ww=ones(22))
return 22.2
end
turns into this:
xxx22xx1B(e99y::Array) = xxx22xx1B(e99y, ones(22))
function xxx22xx1B(e99y::Array,ww)
return 22.2
end
So you get 2 functions ;)
Am Montag, 18. April 2016 09:38:19 UTC+2 schrieb bernhard:
>
> Hi
Thanks.
*I noticed that Julia tells me that two functions are defined.*
*Why would that happen?*
consider this piece of code:
julia> function xxx22xx1B(e99y::Array,ww=ones(22))
return 22.2
end
xxx22xx1B (generic function with 2 methods)
Minimal version: not sure how easy that
I checked again. If I load my package first, the function allocates about
6MB.
I do not know why. If anyone could give me a hint that would be great!
I do not want to publish my package (sorry for that). It is quite large and
somewhat proprietary.
It could be a scoping issue, but I do not know
Okay. If you could try to create a minimal module that still shows this
behavior, then maybe someone can help. Is the package available online?
On Monday, April 18, 2016 at 11:11:26 AM UTC+2, bernhard wrote:
>
> You are right.
> Thanks.
>
> The issue is related to a package of mine.
> If I first
You are right.
Thanks.
The issue is related to a package of mine.
If I first load my package and then define this function (with a unique
name even), it will allocate 6MB of ram for n=30k.
I think it is related to the fact that I overloaded some functions (length
and others). Well I extended
I'm playing around with calling c code. After changes in my code and thus
in the shared library I need to restart Julia in order to make the new code
available in Julia/ccall.
Question: is it possible to unload (and reload) a library? (It works using
dlopen/dlclose without a ccall. But as soon
Say I have something like
type MyType{T}
a::T
b::Vector{T}
c::Vector{Vector{T}}
d::Vector{Matrix{T}}
end
MyType(3, [3, 3], Vector{Int64}[[3,3], [4,4]], Matrix{Int64}[[3 1],[1 3]])
MyType(3, [3, 3], Vector[[3,3], [4,4]], Matrix[[3 1],[1 3]])
The first call to the MyType
What do you mean by slow and a lot of memory here?
julia> using Benchmarks
julia> @benchmark gini(ab,cd,ef)
Benchmark Results
Time per evaluation: 3.68 ms [3.54 ms, 3.82 ms]
Proportion of time in GC: 0.12% [0.00%, 0.84%]
Memory allocated:
Hi all
I have written the function below. For some reason it is quite slow and
allocates a lot of memory.
I realize that the sorting (which creates srt) needs memory to store the
sort order.
However the second loop also seems to allocate a lot of memory and I do not
know why.
Arrlen and i are
It looks like your `ratio` is a scalar number and you are trying to get the
k-th element of it.
On Sun, Apr 17, 2016 at 3:32 PM, Yichao Yu wrote:
> On Sun, Apr 17, 2016 at 9:14 AM, Emeline Lépine
> wrote:
> > Hi,
> >
> > According the index line 37
44 matches
Mail list logo