[julia-users] Weird promotion bug

2015-03-29 Thread Sheehan Olver
I have a weird bug in the promotion system where promote_type(a,b) is not equal to promote_type(b,a). It looks like the function call on line 101 of promotion.jl for one ordering is being called even though a≠b. a and b are different template variable choices of the same type. @code_typed

Re: [julia-users] Weird promotion bug

2015-03-29 Thread Sheehan Olver
H, somehow changing it so that one templated parameter was consistently Domain{T:Number} instead of a mix of Domain{T:Number} and Interval{T:Number} fixed the bug. Is it true that I should only be using concrete types as template parameters? So Interval{Float64} instead

Re: [julia-users] Calling gemm! on part of an array

2015-03-29 Thread Tim Holy
To expand a little: julia 0.3: doesn't (and won't) support irregular (Vector{Int}) indexes in SubArrays julia 0.4: does support Vector{Int} indexes in SubArrays BLAS/LAPACK: does not support, and presumably never will support, subarrays with irregular indexing. So as Andreas said, you can do

Re: [julia-users] Is there a function to flatten a multidimensional array?

2015-03-29 Thread Tim Holy
It's not a 4-by-2 array, it's a 4-vector of 2-vectors. If you want to create a 4-by-2 array, use chunky = [a*b for a in arr, b in (, d)] --Tim On Saturday, March 28, 2015 05:36:50 PM Anthony Voutas wrote: None of the above are working for me. s = string arr = [s,s,s,s] transform = (x -

Re: [julia-users] SubArray memory footprint

2015-03-29 Thread Sebastian Good
Makes sense. Was just thinking naively of the start and next functions using tuples, as they would know the proper dimensions etc but I bet this is what Cartesian index does and now I should look at it :-) On Saturday, March 28, 2015, Tim Holy tim.h...@gmail.com wrote: Right now

Re: [julia-users] Extending a DataFrame (or, why aren't my imports working?)

2015-03-29 Thread Milan Bouchet-Valat
Le dimanche 29 mars 2015 à 09:33 -0400, Stefan Karpinski a écrit : Why is it odd? I understand that this behavior can be confusing the first time you experience it. Since multiple dispatch is one of Julia strong points, I also expected at first that all methods with the same name would be merged

[julia-users] Re: Using spones

2015-03-29 Thread Mladen Kolar
Thank you for the info. On Saturday, March 28, 2015 at 7:56:54 PM UTC-5, Yee Sian Ng wrote: If you use tab-completion in an interactive session, julia spones( spones{T}(S::SparseMatrixCSC{T,Ti:Integer}) at sparse/sparsematrix.jl:401 ​ you'll see that the spones() function in Base only

[julia-users] Re: debugging Kernel died in IJulia

2015-03-29 Thread Daniel Høegh
Thank you Big Stone, I removed 0.3.7, Ipython, .julia/0.3 and the .ipython folder in my home folder and the installed from fresh and it works:)

Re: [julia-users] Extending a DataFrame (or, why aren't my imports working?)

2015-03-29 Thread Stefan Karpinski
Why is it odd? On Mar 28, 2015, at 10:16 PM, kevin.dale.sm...@gmail.com wrote: On Saturday, March 28, 2015 at 4:19:44 PM UTC-5, Mauro wrote: Now, generic functions carry around with them the module in which they were first defined. To extend such a function with another method in

Re: [julia-users] Why is Gadfly so slow when plotting it's first plot?

2015-03-29 Thread Steven Sagaert
Thanks for the info. I suspected it might have something to do with JIT compilation. On Saturday, March 28, 2015 at 2:16:54 PM UTC+1, Isaiah wrote: This delay is due to parsing and JIT'ing a bunch of code in both Gadfly and dependencies. There is a work-in-progress caching process you

Re: [julia-users] ANN: Debug now with Julia 0.4 support

2015-03-29 Thread Toivo Henningsson
Thanks Tim!

Re: [julia-users] Extending a DataFrame (or, why aren't my imports working?)

2015-03-29 Thread Toivo Henningsson
I wouldn't say that generic functions remember in which module they were first defined. Rather, a `using` declaration is kind of a weak import that says to only look for a name in the given module if it is not found in the current module. So when defining a method in the current module, no

[julia-users] ANN: Debug now with Julia 0.4 support

2015-03-29 Thread Toivo Henningsson
Btw there's still some deprecations. Not sure how to get rid of them, especially while keeping compatibility with Julia 0.3.

Re: [julia-users] converting array of Int64 to array of UTF8String doesn't quite work

2015-03-29 Thread Milan Bouchet-Valat
Le dimanche 29 mars 2015 à 09:46 -0700, Philip Tellis a écrit : On Sunday, March 29, 2015 at 6:47:32 AM UTC-4, Milan Bouchet-Valat wrote: Le samedi 28 mars 2015 à 21:35 -0700, Philip Tellis a écrit : I've written the following code:

[julia-users] Efficient Data Transfer via HTTPS

2015-03-29 Thread Jacob Quinn
So I'm building a program that does the following: * Have data stored either in a file (CSV or gzipped CSV) or a Julia structure (Array{T,2}, or other structures that support getindex(A,i,j)) * Need to do a POST request over HTTPS with Content-Type: text/csv, and ideally always as

[julia-users] Re: A few notes and questions on building 0.3.8-pre on ARM or Jetson-tk1

2015-03-29 Thread Viral Shah
0.3 does not have the ARM related patches in Julia. I doubt it will work on 0.3 even if you get it compiled. Even on 0.4, we have some ways to pass all tests before trying to use packages. Do you see success for `make testall`? -viral On Sunday, March 29, 2015 at 7:11:37 PM UTC+2, Kevin Owens

[julia-users] Re: debugging Kernel died in IJulia

2015-03-29 Thread Big Stone
All our beautifull continuous integration systems, Travis, AppVeyor ... , do only check that the clean install procedure works.

Re: [julia-users] Extending a DataFrame (or, why aren't my imports working?)

2015-03-29 Thread kevin . dale . smith
You pretty much nailed it on the head as to why I thought it was odd. I still have some work to do to get my head around what the best way is to work around my current issue. It still seems like most of the DataFrame methods should be defined in AbstractDataFrame to make it easier to

[julia-users] Re: Why is Gadfly so slow when plotting it's first plot?

2015-03-29 Thread Sheehan Olver
I think it's purposely slow, just to annoy Julia developers into implementing a system that saves compiles from previous sessions  On Sunday, March 29, 2015 at 12:00:28 AM UTC+11, Steven Sagaert wrote: Hi, I use Gadfly to create simple barplots save them as SVG. Since this is for usage

[julia-users] Re: debugging Kernel died in IJulia

2015-03-29 Thread Big Stone
I did a clean re-install of Julia 0.3.7 + friends packages + manually edited the kernel.json file that was looking odd to my eyes. (4 times '\', instead of 2 '\' , in .ipython\kernels\julia\kernel.json path) On Sunday, March 29, 2015 at 9:36:48 AM UTC+2, Daniel Høegh wrote: I installed

Re: [julia-users] ANN: Debug now with Julia 0.4 support

2015-03-29 Thread Tim Holy
This is great news, and apologies are not warranted: it's a wonderful gift you've given the community! Best, --Tim On Sunday, March 29, 2015 12:37:49 AM Toivo Henningsson wrote: I just released Debug https://github.com/toivoh/Debug.jl v0.1.2 with Julia 0.4 support. I think this has been some

[julia-users] Re: debugging Kernel died in IJulia

2015-03-29 Thread Daniel Høegh
I installed 0.3.7 removed 0.3.6 and did a Pkg.build(IJulia) in 0.3.7

[julia-users] ANN: Debug now with Julia 0.4 support

2015-03-29 Thread Toivo Henningsson
I just released Debug https://github.com/toivoh/Debug.jl v0.1.2 with Julia 0.4 support. I think this has been some time overdue now, sorry for the long wait! / Toivo

Re: [julia-users] converting array of Int64 to array of UTF8String doesn't quite work

2015-03-29 Thread Tim Holy
For the record, this works as desired in 0.4. I'm not sure how it got fixed, but if you file an issue on GitHub perhaps the fixer might be able to backport it? Best, --Tim On Saturday, March 28, 2015 09:35:15 PM Philip Tellis wrote: I've written the following code: import Base.convert

[julia-users] Re: A few notes and questions on building 0.3.8-pre on ARM or Jetson-tk1

2015-03-29 Thread Kevin Owens
No, it gets an error because there is a build option with gcc and g++ of -m32 (32 being the word length). Now that I see this, I remember this being an issue when I installed 0.4* about a month ago. (Sorry if this would be more appropriate in the julia-dev list.) Here's the output from

Re: [julia-users] Extending a DataFrame (or, why aren't my imports working?)

2015-03-29 Thread kevin . dale . smith
This does bring up a question about writing methods though. What happens if two completely unrelated packages define a function 'foobar' (that isn't part of Base or any other Julia standard package) and someone tries to use both packages? It seems like this couldn't work. You would only get

Re: [julia-users] Extending a DataFrame (or, why aren't my imports working?)

2015-03-29 Thread Mauro
This does bring up a question about writing methods though. What happens if two completely unrelated packages define a function 'foobar' (that isn't part of Base or any other Julia standard package) and someone tries to use both packages? It seems like this couldn't work. You would only

Re: [julia-users] Calling gemm! on part of an array

2015-03-29 Thread Andreas Noack
I think that you could use sub(A,:,2:2:4) for BLAS, but not sub(A,:,[2,4]) because the indexing has to be with ranges for BLAS to be able to extract the right elements of the matrix. 2015-03-29 17:34 GMT-04:00 Dominique Orban dominique.or...@gmail.com: Sorry if this is another [:] kind of

Re: [julia-users] Calling gemm! on part of an array

2015-03-29 Thread Andreas Noack
C[:,idx] creates a copy, so gemm updates a copy of part of C and then discarts it after the computation. sub(C,:,idx) creates a view instead of a copy. 2015-03-29 18:10 GMT-04:00 Dominique Orban dominique.or...@gmail.com: Sorry there was a typo in my example. It should have been

[julia-users] Calling gemm! on part of an array

2015-03-29 Thread Dominique Orban
Sorry if this is another [:] kind of question, but I can't seem to find the right syntax to call BLAS.gemm! on part of an array. The piece of code julia n = 10; m = 5; idx = [2, 4]; julia C = rand(n, m); A = rand(n, m); B = rand(m, m); julia BLAS.gemm!('N', 'N', 1.0, A[:,idx], B[:,idx], 1.0,

Re: [julia-users] Calling gemm! on part of an array

2015-03-29 Thread Dominique Orban
Sorry there was a typo in my example. It should have been BLAS.gemm!('N', 'N', 1.0, A[:,idx], B[idx,idx], 1.0, C[:,idx]); for the dimensions to work out. The gemm! command works fine, is happy with the dimensions, and produces the correct update. As far as I can tell, C1 = C[:,idx];

Re: [julia-users] Calling gemm! on part of an array

2015-03-29 Thread Dominique Orban
Unfortunately, my idx will be computed on the fly and there's zero chance that it would be a range. Is there a plan to support more general indexing in subarrays and/or ArrayView? On Sunday, March 29, 2015 at 6:13:16 PM UTC-4, Andreas Noack wrote: C[:,idx] creates a copy, so gemm updates a

[julia-users] Re: Why is Gadfly so slow when plotting it's first plot?

2015-03-29 Thread Daniel Jones
Shhh, no one is supposed to know that. On Sunday, March 29, 2015 at 4:47:46 AM UTC-7, Sheehan Olver wrote: I think it's purposely slow, just to annoy Julia developers into implementing a system that saves compiles from previous sessions  On Sunday, March 29, 2015 at 12:00:28 AM UTC+11,

Re: [julia-users] Calling gemm! on part of an array

2015-03-29 Thread Andreas Noack
It is supported in SubArrays and you can also multiply with these in place with A_mul_B!, but this will be calling a generic multiplication method implemented in Julia instead of BLAS. So far it doesn't support the α and β arguments of C:=αAB+βC, but I'm working on that. 2015-03-29 18:23

[julia-users] Getting Subarray with Multiple Boolean Comparions (Logical Indexing)

2015-03-29 Thread Andreas ten Pas
How can we do the following *Matlab* code in *Julia*? A=rand(4); A(:,A(1,:)0.7) I've tried this in *Julia*: A=rand(4,4); A[:,A[1,:].0.7] And how would we combine multiple *boolean comparisons* in the indexing such as *A(:,A(1,:)0.7 A(1,:)0.9)*?

Re: [julia-users] How to test argument types available on a Function?

2015-03-29 Thread Sheehan Olver
OK Here’s the final version arglength(f)=length(Base.uncompressed_ast(f.code.def).args[1]) function Fun(f::Function) if (isgeneric(f)applicable(f,0)) || (!isgeneric(f)arglength(f)==1) # check for tuple try f(0) catch ex if isa(ex,BoundsError)