Re: [julia-users] sparse function

2016-05-02 Thread Patrick Kofod Mogensen
Can you try to show a small script that reproduces the error?

On Tuesday, May 3, 2016 at 6:16:43 AM UTC+2, new to Julia wrote:
>
> Thanks for your reply. 
> A=sparse(nrow,ncol,vals_final); 
> nrow, ncol, vals_final are all 1 dimensional vector. 
>
> On Monday, May 2, 2016 at 11:10:12 PM UTC-5, Michele Zaffalon wrote:
>>
>> Can you post the code that generate the error?
>>
>> On Tue, May 3, 2016 at 5:47 AM, new to Julia  wrote:
>>
>>> Hi all:
>>>
>>> when I use sparse function in Julia coding, I have the following error:
>>>
>>> LoadError: MethodError: `sparse` has no method matching 
>>> sparse(::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Int64, 
>>> ::Int64, ::Base.AddFun)
>>> Closest candidates are:
>>> sparse(::Any, ::Any, ::AbstractArray{T,1}, ::Any, ::Any)
>>> sparse(::Any, ::Any, !Matched::Number, ::Any, ::Any, 
>>> ::Union{Base.Func{N},Function})
>>> sparse(::Any, ::Any, !Matched::AbstractArray{Bool,1}, ::Any, ::Any)
>>> ...
>>> in sparse at sparse/sparsematrix.jl:380
>>>
>>> I am wondering that how can I fix the bug? Thank you very much.
>>>
>>> Best
>>>
>>>
>>>
>>>
>>

Re: [julia-users] sparse function

2016-05-02 Thread Michele Zaffalon
Are you sure? The error message seems to be generated by a different
function call.

On Tue, May 3, 2016 at 6:16 AM, new to Julia  wrote:

> Thanks for your reply.
> A=sparse(nrow,ncol,vals_final);
> nrow, ncol, vals_final are all 1 dimensional vector.
>
> On Monday, May 2, 2016 at 11:10:12 PM UTC-5, Michele Zaffalon wrote:
>>
>> Can you post the code that generate the error?
>>
>> On Tue, May 3, 2016 at 5:47 AM, new to Julia  wrote:
>>
>>> Hi all:
>>>
>>> when I use sparse function in Julia coding, I have the following error:
>>>
>>> LoadError: MethodError: `sparse` has no method matching
>>> sparse(::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Int64,
>>> ::Int64, ::Base.AddFun)
>>> Closest candidates are:
>>> sparse(::Any, ::Any, ::AbstractArray{T,1}, ::Any, ::Any)
>>> sparse(::Any, ::Any, !Matched::Number, ::Any, ::Any,
>>> ::Union{Base.Func{N},Function})
>>> sparse(::Any, ::Any, !Matched::AbstractArray{Bool,1}, ::Any, ::Any)
>>> ...
>>> in sparse at sparse/sparsematrix.jl:380
>>>
>>> I am wondering that how can I fix the bug? Thank you very much.
>>>
>>> Best
>>>
>>>
>>>
>>>
>>


Re: [julia-users] sparse function

2016-05-02 Thread new to Julia
Thanks for your reply. 
A=sparse(nrow,ncol,vals_final); 
nrow, ncol, vals_final are all 1 dimensional vector. 

On Monday, May 2, 2016 at 11:10:12 PM UTC-5, Michele Zaffalon wrote:
>
> Can you post the code that generate the error?
>
> On Tue, May 3, 2016 at 5:47 AM, new to Julia  > wrote:
>
>> Hi all:
>>
>> when I use sparse function in Julia coding, I have the following error:
>>
>> LoadError: MethodError: `sparse` has no method matching 
>> sparse(::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Int64, 
>> ::Int64, ::Base.AddFun)
>> Closest candidates are:
>> sparse(::Any, ::Any, ::AbstractArray{T,1}, ::Any, ::Any)
>> sparse(::Any, ::Any, !Matched::Number, ::Any, ::Any, 
>> ::Union{Base.Func{N},Function})
>> sparse(::Any, ::Any, !Matched::AbstractArray{Bool,1}, ::Any, ::Any)
>> ...
>> in sparse at sparse/sparsematrix.jl:380
>>
>> I am wondering that how can I fix the bug? Thank you very much.
>>
>> Best
>>
>>
>>
>>
>

Re: [julia-users] sparse function

2016-05-02 Thread Michele Zaffalon
Can you post the code that generate the error?

On Tue, May 3, 2016 at 5:47 AM, new to Julia  wrote:

> Hi all:
>
> when I use sparse function in Julia coding, I have the following error:
>
> LoadError: MethodError: `sparse` has no method matching
> sparse(::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Int64,
> ::Int64, ::Base.AddFun)
> Closest candidates are:
> sparse(::Any, ::Any, ::AbstractArray{T,1}, ::Any, ::Any)
> sparse(::Any, ::Any, !Matched::Number, ::Any, ::Any,
> ::Union{Base.Func{N},Function})
> sparse(::Any, ::Any, !Matched::AbstractArray{Bool,1}, ::Any, ::Any)
> ...
> in sparse at sparse/sparsematrix.jl:380
>
> I am wondering that how can I fix the bug? Thank you very much.
>
> Best
>
>
>
>


[julia-users] sparse function

2016-05-02 Thread new to Julia
Hi all:

when I use sparse function in Julia coding, I have the following error:

LoadError: MethodError: `sparse` has no method matching 
sparse(::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Int64, 
::Int64, ::Base.AddFun)
Closest candidates are:
sparse(::Any, ::Any, ::AbstractArray{T,1}, ::Any, ::Any)
sparse(::Any, ::Any, !Matched::Number, ::Any, ::Any, 
::Union{Base.Func{N},Function})
sparse(::Any, ::Any, !Matched::AbstractArray{Bool,1}, ::Any, ::Any)
...
in sparse at sparse/sparsematrix.jl:380

I am wondering that how can I fix the bug? Thank you very much.

Best





Re: [julia-users] What does "include" really do?

2016-05-02 Thread Yichao Yu
On Mon, May 2, 2016 at 8:08 PM, K leo  wrote:
> Well that is very strange.  Somethings seems to get bigger or clumsier after
> many repeated includes.  I wonder what that can be.  I don't have global
> arrays, only some global constants.  Most of the time my repeated includes
> is only after changing a line or a couple lines of codes or even a parameter
> value, etc.  How can I time the time spent on include?

@time

>
> On Monday, May 2, 2016 at 10:07:17 PM UTC+5:30, Yichao Yu wrote:
>>
>>
>> On May 2, 2016 12:07 PM, "K leo"  wrote:
>> >
>> > Did you imply that repeating "include" at the REPL should not slow it
>> > down?
>> >
>>
>> No it shouldn't.
>>
>> >
>> > On Monday, May 2, 2016 at 9:10:58 PM UTC+5:30, Yichao Yu wrote:
>> >>
>> >> include parse and eval the file in current module.
>> >>
>> >> Without detail (and I mean very detail, not just a sentence or two
>> >> about what it does) about your code, it's impossible to tell what's
>> >> happening.


Re: [julia-users] What does "include" really do?

2016-05-02 Thread K leo
Well that is very strange.  Somethings seems to get bigger or clumsier 
after many repeated includes.  I wonder what that can be.  I don't have 
global arrays, only some global constants.  Most of the time my repeated 
includes is only after changing a line or a couple lines of codes or even a 
parameter value, etc.  How can I time the time spent on include?

On Monday, May 2, 2016 at 10:07:17 PM UTC+5:30, Yichao Yu wrote:
>
>
> On May 2, 2016 12:07 PM, "K leo"  wrote:
> >
> > Did you imply that repeating "include" at the REPL should not slow it 
> down?
> >
>
> No it shouldn't.
>
> >
> > On Monday, May 2, 2016 at 9:10:58 PM UTC+5:30, Yichao Yu wrote:
> >>
> >> include parse and eval the file in current module. 
> >>
> >> Without detail (and I mean very detail, not just a sentence or two 
> >> about what it does) about your code, it's impossible to tell what's 
> >> happening. 
>


[julia-users] [ANN] JavaCall version 0.3.5

2016-05-02 Thread Avik Sengupta
I tagged a new version of JavaCall a few days ago, v0.3.5. I would 
recommend upgrading to it immediately. In particular, this version is 
required to use dfdx/Spark.jl.

This version solves a long standing segfault (thanks to @adambrewster), as 
well as enable support for accessing fields of classes and instances. 

I wanted to particularly mention this version since it will be the last one 
that supports Julia v0.3.5. The next version will be julia 0.4 only. Please 
shout if this is likely to be of any concern. 

Regards
-
Avik


[julia-users] [ANN] Book: Julia High Performance

2016-05-02 Thread Avik Sengupta
Just wanted to let you know about the new book discussing the design and 
development of high performance julia code. It discusses the tools you can 
use to analyse the performance of your code, and ways to make it go faster, 
using the full power of Julia's compiler.  Hope this is useful for some. 

https://www.packtpub.com/application-development/julia-high-performance

Regards
-
Avik

(Incidentally, all the ebooks from the publisher are being discounted for 
the next day or so)


Re: [julia-users] calling sort on a range with rev=true

2016-05-02 Thread Steven G. Johnson
The case of sort and select are fixed here:

   https://github.com/JuliaLang/julia/pull/16168

(If you pass them keyword arguments, then they pretty much have to return a 
full array, rather than try to be clever and return another range, for 
type-stability.  e.g. sort(-5:5, by=abs) can't be expressed in terms of a 
range.)


Re: [julia-users] Time handling: Micro/Nanosecond precision and time string formatting like Unix

2016-05-02 Thread Avik Sengupta

On Friday, 29 April 2016 15:28:34 UTC+1, Stefan Karpinski wrote:
>
> There was talk of adding a Time type to the standard library to complement 
> DateTime and Date.
>
>
There is a PR for this: https://github.com/JuliaLang/julia/pull/12274 


Re: [julia-users] Image not saving

2016-05-02 Thread Tim Holy
Really glad you got it working! I understand how frustrating it can be when 
even the simple things don't work as expected.

Best,
--Tim

On Monday, May 02, 2016 09:18:47 AM yousef.k.alham...@gmail.com wrote:
> For some unusual but fortunate reason, the "save" function is now working
> as expected.
> Maybe it was an out-of-date package because the stale package caches were
> recompiled.
> After that, I can now save images directly from Float64 arrays without any
> problems.
> 
> Thank you for you time and patience.
> Yousef



Re: [julia-users] What does "include" really do?

2016-05-02 Thread Steven G. Johnson


On Monday, May 2, 2016 at 12:37:17 PM UTC-4, Yichao Yu wrote:
>
> On May 2, 2016 12:07 PM, "K leo"  wrote:
> > Did you imply that repeating "include" at the REPL should not slow it 
> down?
> >
>
> No it shouldn't.
>

 (Obviously, it depends on the code you are including.   If you are 
including code that acts on some global array, and makes the global array 
bigger and bigger ever time the code is executed, then this will slow down. 
  But if your code just defines some functions and things, repeated 
includes should not be slower.)


Re: [julia-users] It is getting harder to match function prototypes

2016-05-02 Thread David van Leeuwen
Not that I know.  I do have some logic to sort out UpperTriangular for 
versions < v"0.4.0-dev", but this does not run for julia-0.5. 

It seems though, that this particular error only occurs in testing with 2 
subprocesses for parallel computation.  I've made sure that the version of 
the code in ~/.julia/v0.5/GaussianMixtures is the same as the codebase I am 
developing in.  

Perhaps the processes spawned by `addprocs()` run a different version of 
Julia than what I am using for testing?  Could any of these types have 
changed identity in such version mismatch?  I have /usr/local/bin/julia 
pointing to julia-0.4 . 

On Monday, May 2, 2016 at 5:32:03 PM UTC+2, Stefan Karpinski wrote:
>
> That's strange – that method appears to match what is being looked for. 
> Have you defined your own Matrix, Vector or UpperTriangular types that 
> might be disjoint from the ones provided by Julia??
>
> On Mon, May 2, 2016 at 10:13 AM, David van Leeuwen  > wrote:
>
>> Hello, 
>>
>> I am trying to get GaussianMixtuers.jl to pass the tests in 
>> julia-0.5.0-dev+3476 .  I am more and more often running into problems 
>> related to not being able to find any function to dispatch to, it seems.  
>> This time, I am stuck with the error
>>
>> MethodError: no method matching xμTΛxμ!(::Array{Float64,2}, ::Array{
>> Float64,2}, ::Array{Float64,1}, ::UpperTriangular{Float64,Array{Float64,2
>> }})
>> Closest candidates are: 
>>   xμTΛxμ!(::Array{T,2}, ::Array{T,2}, ::Array{T,1}, ::UpperTriangular{T,S
>> <:AbstractArray{T,2}})
>>
>>
>> The badly named `xμTΛxμ!()` is a function in GaussianMixtures.   In this 
>> case, I can't really see which of the arguments does't match to the closest 
>> candidate.  The type `T` in the closest candidate is not specified in the 
>> function prototype, so I guess that implicitly the four `T`s in the closest 
>> candidate are, in fact, implicitly not the same type.  But even if they are 
>> implicitly the same type, the call clearly is with `T==Float64` for the 
>> five `T`s in the closest candidate.  The prototype is
>>
>>
>>
>> function xμTΛxμ!(Δ::Matrix, x::Matrix, μ::Vector, ciΣ::UpperTriangular)
>>
>>
>> In julia-0.3 and julia-0.4, this problem does not occur.   Does anyone 
>> know what might be going on?
>>
>>
>> Thanks, 
>>
>>
>> ---david
>>
>
>

Re: [julia-users] What does "include" really do?

2016-05-02 Thread Yichao Yu
On May 2, 2016 12:07 PM, "K leo"  wrote:
>
> Did you imply that repeating "include" at the REPL should not slow it
down?
>

No it shouldn't.

>
> On Monday, May 2, 2016 at 9:10:58 PM UTC+5:30, Yichao Yu wrote:
>>
>> include parse and eval the file in current module.
>>
>> Without detail (and I mean very detail, not just a sentence or two
>> about what it does) about your code, it's impossible to tell what's
>> happening.


Re: [julia-users] Image not saving

2016-05-02 Thread yousef . k . alhammad
For some unusual but fortunate reason, the "save" function is now working 
as expected.
Maybe it was an out-of-date package because the stale package caches were 
recompiled.
After that, I can now save images directly from Float64 arrays without any 
problems.

Thank you for you time and patience.
Yousef



Re: [julia-users] What does "include" really do?

2016-05-02 Thread K leo
Did you imply that repeating "include" at the REPL should not slow it down?

On Monday, May 2, 2016 at 9:10:58 PM UTC+5:30, Yichao Yu wrote:
>
> include parse and eval the file in current module. 
>
> Without detail (and I mean very detail, not just a sentence or two 
> about what it does) about your code, it's impossible to tell what's 
> happening. 
>


Re: [julia-users] Re: function to paste into REPL?

2016-05-02 Thread Ali Rezaee

It's working now. I didn't have xclip installed.

Thanks for your help.
On Monday, May 2, 2016 at 6:00:12 PM UTC+2, Stefan Karpinski wrote:

> What is the code that you're pasting in?
>
> On Mon, May 2, 2016 at 11:56 AM, Ali Rezaee  > wrote:
>
>>
>> Thanks, Ethan. I get the same error. Could it be an issue with my Julia 
>> installation?
>> I am on Version 0.4.6-pre+24 (2016-04-17 03:57 UTC)
>>
>> On Monday, May 2, 2016 at 5:52:13 PM UTC+2, Ethan Anderes wrote:
>>>
>>> I use:
>>>
>>> function paste()
>>> include_string(clipboard())
>>> return nothing
>>> end
>>>
>>> and put it in my .juliarc.jl
>>>
>>> On Monday, May 2, 2016 at 4:28:56 AM UTC-7, Ali Rezaee wrote:
>>>
>>>

 Hi,

 Is there a function or macro that pastes the copied code into REPL? 
 something similar to %paste in iPython.

 Thanks :)

>>> ​
>>>
>>
>

Re: [julia-users] Re: function to paste into REPL?

2016-05-02 Thread Yichao Yu
On Mon, May 2, 2016 at 12:00 PM, Yichao Yu  wrote:
> On Mon, May 2, 2016 at 11:56 AM, Ali Rezaee  wrote:
>>
>> Thanks, Ethan. I get the same error. Could it be an issue with my Julia
>> installation?
>
> What code are you pasting...

Also note that pasting in julia repl directly (without a magic
function) is less problematic than python since there's no auto
indenting feature that can change the meaning of the code.

>
>> I am on Version 0.4.6-pre+24 (2016-04-17 03:57 UTC)
>>
>> On Monday, May 2, 2016 at 5:52:13 PM UTC+2, Ethan Anderes wrote:
>>>
>>> I use:
>>>
>>> function paste()
>>> include_string(clipboard())
>>> return nothing
>>> end
>>>
>>> and put it in my .juliarc.jl
>>>
>>> On Monday, May 2, 2016 at 4:28:56 AM UTC-7, Ali Rezaee wrote:



 Hi,

 Is there a function or macro that pastes the copied code into REPL?
 something similar to %paste in iPython.

 Thanks :)


Re: [julia-users] Re: function to paste into REPL?

2016-05-02 Thread Yichao Yu
On Mon, May 2, 2016 at 11:56 AM, Ali Rezaee  wrote:
>
> Thanks, Ethan. I get the same error. Could it be an issue with my Julia
> installation?

What code are you pasting...

> I am on Version 0.4.6-pre+24 (2016-04-17 03:57 UTC)
>
> On Monday, May 2, 2016 at 5:52:13 PM UTC+2, Ethan Anderes wrote:
>>
>> I use:
>>
>> function paste()
>> include_string(clipboard())
>> return nothing
>> end
>>
>> and put it in my .juliarc.jl
>>
>> On Monday, May 2, 2016 at 4:28:56 AM UTC-7, Ali Rezaee wrote:
>>>
>>>
>>>
>>> Hi,
>>>
>>> Is there a function or macro that pastes the copied code into REPL?
>>> something similar to %paste in iPython.
>>>
>>> Thanks :)


Re: [julia-users] Re: function to paste into REPL?

2016-05-02 Thread Stefan Karpinski
What is the code that you're pasting in?

On Mon, May 2, 2016 at 11:56 AM, Ali Rezaee  wrote:

>
> Thanks, Ethan. I get the same error. Could it be an issue with my Julia
> installation?
> I am on Version 0.4.6-pre+24 (2016-04-17 03:57 UTC)
>
> On Monday, May 2, 2016 at 5:52:13 PM UTC+2, Ethan Anderes wrote:
>>
>> I use:
>>
>> function paste()
>> include_string(clipboard())
>> return nothing
>> end
>>
>> and put it in my .juliarc.jl
>>
>> On Monday, May 2, 2016 at 4:28:56 AM UTC-7, Ali Rezaee wrote:
>>
>>
>>>
>>> Hi,
>>>
>>> Is there a function or macro that pastes the copied code into REPL?
>>> something similar to %paste in iPython.
>>>
>>> Thanks :)
>>>
>> ​
>>
>


[julia-users] Re: function to paste into REPL?

2016-05-02 Thread Ali Rezaee

Thanks, Ethan. I get the same error. Could it be an issue with my Julia 
installation?
I am on Version 0.4.6-pre+24 (2016-04-17 03:57 UTC)
On Monday, May 2, 2016 at 5:52:13 PM UTC+2, Ethan Anderes wrote:
>
> I use:
>
> function paste()
> include_string(clipboard())
> return nothing
> end
>
> and put it in my .juliarc.jl
>
> On Monday, May 2, 2016 at 4:28:56 AM UTC-7, Ali Rezaee wrote:
>
>
>>
>> Hi,
>>
>> Is there a function or macro that pastes the copied code into REPL? 
>> something similar to %paste in iPython.
>>
>> Thanks :)
>>
> ​
>


[julia-users] Re: function to paste into REPL?

2016-05-02 Thread Ethan Anderes


I use:

function paste()
include_string(clipboard())
return nothing
end

and put it in my .juliarc.jl

On Monday, May 2, 2016 at 4:28:56 AM UTC-7, Ali Rezaee wrote:


>
> Hi,
>
> Is there a function or macro that pastes the copied code into REPL? 
> something similar to %paste in iPython.
>
> Thanks :)
>
​


Re: [julia-users] function to paste into REPL?

2016-05-02 Thread Ali Rezaee
Thanks, Stefan.
I get the following error, though.

julia> eval(parse(clipboard()))
ERROR: MethodError: `data` has no method matching data(::Symbol)
 in arg_gen at process.jl:624
 in cmd_gen at process.jl:646
 in clipboardcmd at interactiveutil.jl:95
 in clipboard at interactiveutil.jl:109



On Monday, May 2, 2016 at 5:29:49 PM UTC+2, Stefan Karpinski wrote:

> eval(parse(clipboard())) will do it.
>
> On Mon, May 2, 2016 at 7:28 AM, Ali Rezaee  > wrote:
>
>>
>>
>> Hi,
>>
>> Is there a function or macro that pastes the copied code into REPL? 
>> something similar to %paste in iPython.
>>
>> Thanks :)
>>
>
>

Re: [julia-users] What does "include" really do?

2016-05-02 Thread Yichao Yu
On Mon, May 2, 2016 at 11:33 AM, K leo  wrote:
> When I test my programs, I often do include("myprog.jl") on the REPL after
> editing the program.  What I found is that after I do this enough times,
> response to the "include" becomes slow at the REPL.  What is happening?

include parse and eval the file in current module.

Without detail (and I mean very detail, not just a sentence or two
about what it does) about your code, it's impossible to tell what's
happening.


[julia-users] What does "include" really do?

2016-05-02 Thread K leo
When I test my programs, I often do include("myprog.jl") on the REPL after
editing the program.  What I found is that after I do this enough times,
response to the "include" becomes slow at the REPL.  What is happening?


Re: [julia-users] It is getting harder to match function prototypes

2016-05-02 Thread Stefan Karpinski
That's strange – that method appears to match what is being looked for.
Have you defined your own Matrix, Vector or UpperTriangular types that
might be disjoint from the ones provided by Julia??

On Mon, May 2, 2016 at 10:13 AM, David van Leeuwen <
david.vanleeu...@gmail.com> wrote:

> Hello,
>
> I am trying to get GaussianMixtuers.jl to pass the tests in
> julia-0.5.0-dev+3476 .  I am more and more often running into problems
> related to not being able to find any function to dispatch to, it seems.
> This time, I am stuck with the error
>
> MethodError: no method matching xμTΛxμ!(::Array{Float64,2}, ::Array{
> Float64,2}, ::Array{Float64,1}, ::UpperTriangular{Float64,Array{Float64,2
> }})
> Closest candidates are:
>   xμTΛxμ!(::Array{T,2}, ::Array{T,2}, ::Array{T,1}, ::UpperTriangular{T,S
> <:AbstractArray{T,2}})
>
>
> The badly named `xμTΛxμ!()` is a function in GaussianMixtures.   In this
> case, I can't really see which of the arguments does't match to the closest
> candidate.  The type `T` in the closest candidate is not specified in the
> function prototype, so I guess that implicitly the four `T`s in the closest
> candidate are, in fact, implicitly not the same type.  But even if they are
> implicitly the same type, the call clearly is with `T==Float64` for the
> five `T`s in the closest candidate.  The prototype is
>
>
>
> function xμTΛxμ!(Δ::Matrix, x::Matrix, μ::Vector, ciΣ::UpperTriangular)
>
>
> In julia-0.3 and julia-0.4, this problem does not occur.   Does anyone
> know what might be going on?
>
>
> Thanks,
>
>
> ---david
>


Re: [julia-users] function to paste into REPL?

2016-05-02 Thread Stefan Karpinski
eval(parse(clipboard())) will do it.

On Mon, May 2, 2016 at 7:28 AM, Ali Rezaee  wrote:

>
>
> Hi,
>
> Is there a function or macro that pastes the copied code into REPL?
> something similar to %paste in iPython.
>
> Thanks :)
>


[julia-users] It is getting harder to match function prototypes

2016-05-02 Thread David van Leeuwen
Hello, 

I am trying to get GaussianMixtuers.jl to pass the tests in 
julia-0.5.0-dev+3476 .  I am more and more often running into problems 
related to not being able to find any function to dispatch to, it seems. 
 This time, I am stuck with the error

MethodError: no method matching xμTΛxμ!(::Array{Float64,2}, ::Array{Float64,
2}, ::Array{Float64,1}, ::UpperTriangular{Float64,Array{Float64,2}})
Closest candidates are: 
  xμTΛxμ!(::Array{T,2}, ::Array{T,2}, ::Array{T,1}, ::UpperTriangular{T,S<:
AbstractArray{T,2}})


The badly named `xμTΛxμ!()` is a function in GaussianMixtures.   In this 
case, I can't really see which of the arguments does't match to the closest 
candidate.  The type `T` in the closest candidate is not specified in the 
function prototype, so I guess that implicitly the four `T`s in the closest 
candidate are, in fact, implicitly not the same type.  But even if they are 
implicitly the same type, the call clearly is with `T==Float64` for the 
five `T`s in the closest candidate.  The prototype is



function xμTΛxμ!(Δ::Matrix, x::Matrix, μ::Vector, ciΣ::UpperTriangular)


In julia-0.3 and julia-0.4, this problem does not occur.   Does anyone know 
what might be going on?


Thanks, 


---david


Re: [julia-users] Time handling: Micro/Nanosecond precision and time string formatting like Unix

2016-05-02 Thread Tom Short
It's not that hard to extend the date handling in Base to handle this.
Here's one example with microsecond accuracy:

https://github.com/tshort/COMTRADE.jl/blob/master/src/datetime.jl

I also like the idea of a TimeOfDay type like Tom B has implemented.



On Fri, Apr 29, 2016 at 8:06 AM, Ben Southwood 
wrote:

> Are there any packages that can handle "Unix style" times?  How come Julia
> can only handle seconds in 0.4.5 and milliseconds in 0.5 (unstable)?
> Shouldn't we just aim big and go all the way to nanos?
>
> For example, it would be great if I could handle the following times.
>
> 2015-12-11 09:46:40.882362Z
>
> 2015-09-11 14:37:12.960014+01:00,
>
>


Re: [julia-users] Time handling: Micro/Nanosecond precision and time string formatting like Unix

2016-05-02 Thread Ben Southwood
The TimeOfDay package is sweet thanks.

On Friday, April 29, 2016 at 10:28:34 AM UTC-4, Stefan Karpinski wrote:
>
> There was talk of adding a Time type to the standard library to complement 
> DateTime and Date.
>
> On Fri, Apr 29, 2016 at 9:32 AM, Tom Breloff  > wrote:
>
>> I use a type TimeOfDay which is decoupled from the actual date 
>> mechanics.  It's simply a wrapper around nanoseconds since midnight.  
>> Timezones and other date considerations are only applicable if you're 
>> crossing a date boundary or when converting to/from the type.  It's not a 
>> registered package, but feel free to check out: 
>> https://github.com/tbreloff/CTechCommon.jl/blob/master/src/time.jl
>>
>> On Fri, Apr 29, 2016 at 9:26 AM, Yichao Yu > > wrote:
>>
>>> On Fri, Apr 29, 2016 at 9:17 AM, J Luis  
>>> wrote:
>>> > OK, now I'm puzzled (0.4 on Win 64)
>>> >
>>> > julia> 2^60
>>> > 1152921504606846976
>>> >
>>> > julia> 2^62
>>> > 4611686018427387904
>>> >
>>> > julia> 2^63
>>> > -9223372036854775808
>>> >
>>> > julia> 2^64
>>> > 0
>>> >
>>> >
>>>
>>> This is integer overflow.
>>>
>>> >
>>> >
>>> > sexta-feira, 29 de Abril de 2016 às 14:03:52 UTC+1, Stefan Karpinski
>>> > escreveu:
>>> >>
>>> >> I'll answer with a pair of questions:
>>> >>
>>> >> what range of dates can you represent using a 64-bit integer to 
>>> nanosecond
>>> >> precision?
>>> >> what range of dates can you represent using a 64-bit integer to
>>> >> millisecond precision?
>>> >>
>>> >>
>>> >> On Fri, Apr 29, 2016 at 8:06 AM, Ben Southwood 
>>> >> wrote:
>>> >>>
>>> >>> Are there any packages that can handle "Unix style" times?  How come
>>> >>> Julia can only handle seconds in 0.4.5 and milliseconds in 0.5 
>>> (unstable)?
>>> >>> Shouldn't we just aim big and go all the way to nanos?
>>> >>>
>>> >>> For example, it would be great if I could handle the following times.
>>> >>>
>>> >>> 2015-12-11 09:46:40.882362Z
>>> >>>
>>> >>> 2015-09-11 14:37:12.960014+01:00,
>>> >>>
>>> >>
>>> >
>>>
>>
>>
>

[julia-users] function to paste into REPL?

2016-05-02 Thread Ali Rezaee


Hi,

Is there a function or macro that pastes the copied code into REPL? 
something similar to %paste in iPython.

Thanks :)


[julia-users] static compilation

2016-05-02 Thread Ján Adamčák
Hello,

Trying to create an executable from Julia source, there are questions that 
raised... The process of exporting functions wasn't successful, function(s) 
was not exported to dll, and even the generated dll cant be loaded in c++ 
code. Below is the process explained in details:

Can anybody bring more insight, how to build a standalone executable from 
Julia source?


Following resources were used for experiments below:

http://juliacomputing.com/blog/2016/02/09/static-julia.html

http://juliacomputing.com/blog/2016/03/10/j2c-announcement.html


Assume userimg.jl, which contains exported function(s):
# user functionality for DLL
@Base.ccallable foo(x::Int) = x+1


Now, create a dll:
julia.exe "build_sysimg.jl" "./Julia/Compile/bin/" native "julia_dll.jl" --
force



File build_sysimg.jl on line 77 contains following command flags:
   run(`$julia -C $cpu_target --output-ji $sysimg_path.ji --output-o
   $sysimg_path.o --sysimage ../../../lib/julia/sys.dll -J 
$inference_path.ji
   --startup-file=no sysimg.jl --compile=all --eval nothing`)

The resulting dll has 29MB.


The next step is to use the dll in c++ project:
#include 
#include 

typedef int(*fnc_foo) (int);

int main()
{
 HINSTANCE hDLL = LoadLibraryA("test_dll.dll");
 auto a = GetLastError();
 if (hDLL == nullptr)
   throw std::exception("test_dll.dll not found!");

 fnc_foo foo = (fnc_foo)GetProcAddress(hDLL, "foo");
 if(!foo)
   throw std::exception("foo in test_dll.dll not found!");

 std::cout << foo(10) << "\n";

 FreeLibrary(hDLL);

 return 0;
}

In the c++ code above the dll cannot be loaded, hDLL = nullptr, and the 
first exception is thrown.

Expecting the dll with Dependency Walker even an exported function foo() 
cannot be found.

Thanks for any suggestions.
Jan


Re: [julia-users] Reactive.jl toy example problem

2016-05-02 Thread Shashi Gowda
This is definitely a bug... I'll look into fixing it. Thanks!