[julia-users] Re: what's the easiest way to force a recompilation?
Awesome. Thank you. On Friday, December 4, 2015 at 4:29:57 PM UTC-8, Tony Kelman wrote: > > Base.compilecache > > On Friday, December 4, 2015 at 2:50:03 PM UTC-8, Seth wrote: >> >> I'd rather not alter any of the source files. Is there a Pkg command that >> will recompile? (Pkg.build() doesn't seem to do it). >> >
Re: [julia-users] Re: Convert SubString{ASCIIString} to String
Hi Charles, Sorry for the bad advice :) I think you might want to step back one step. This command: julia> myportfolio = readdlm("./portfolio.txt",'\n') might not be what you want. Look at julia> which(readdlm,(ASCIIString,Char)) readdlm(input, dlm::Char) at datafmt.jl:37 It looks like you are making '\n' a delimiter, when it should probably just be the end of line (eol). You might try readcsv or maybe even readtable instead. I don't think you want to end up with a matrix of SubStrings. If you do, then Seth's solution is perfect :) On Saturday, December 5, 2015 at 9:57:32 AM UTC+8, Charles Santana wrote: > > Here it is late, so of course I forgive you the typo! :) But many thanks > for the TIP! :) > > However, it doesn't seem to work here. My problem was that my matrix was > composed by SubString{ASCIIString}. So, if I call typeof(myportfolio[1]) I > get: > > julia> typeof(myportfolio[1]) > SubString{ASCIIString} > > And the same if I call typeof(myportfolio[1,1]): > > julia> typeof(myportfolio[1,1]) > SubString{ASCIIString} > > Could you please send the result of typeof(myportfolio[1]) in your > example? I suppose it would be an ASCIIString. > > Seth's suggestion worked fine for me. To use a cast to ASCIIString to > convert myportfolio[1], like this: > > julia> typeof(ASCIIString(myportfolio[1])) > ASCIIString > > But thanks anyway! > > Best, > > Charles > > > On 5 December 2015 at 01:46, Eric Forgy > > wrote: > >> It's early and I didn't finish my first cup of coffee yet, so forgive the >> typo :) >> >> julia> myportfolio >> 1x1 Array{Any,2}: >> "GOOG/NASDAQ_GOOG" >> >> julia> myportfolio[1,1] >> "GOOG/NASDAQ_GOOG" >> >> julia> typeof(myportfolio[1,1]) >> ASCIIString >> >> >> On Saturday, December 5, 2015 at 8:38:05 AM UTC+8, Eric Forgy wrote: >>> >>> Hi Charles, >>> >>> myportfolio is a Matrix, i.e. Array{Any,2}, so you need two indices to >>> access it: >>> >>> julia> myportfolio >>> 1x1 Array{Any,2}: >>> "GOOG/NASDAQ_GOOD" >>> >>> julia> myportfolio[1,1] >>> "GOOG/NASDAQ_GOOD" >>> >>> julia> typeof(myportfolio[1,1]) >>> ASCIIString >>> >>> Best regards, >>> Eric >>> >>> On Saturday, December 5, 2015 at 6:59:41 AM UTC+8, Charles Santana wrote: wow! That simple! Yes it works! Thanks, Seth! Charles On 4 December 2015 at 23:53, Seth wrote: > Maybe this will work for you? > > julia> a = "foobarbaz" > "foobarbaz" > > julia> b = SubString(a,3,6) > "obar" > > julia> typeof(b) > SubString{ASCIIString} > > julia> c = ASCIIString(b) > "obar" > > julia> typeof(c) > ASCIIString > > > > On Friday, December 4, 2015 at 2:48:12 PM UTC-8, Charles Santana wrote: >> >> Hi people, >> >> Maybe it is a trivial question for most of you, but I really could >> not find a way to solve my problem. >> >> I am using the function quandlget(id::ASCIIString) from the library >> https://github.com/milktrader/Quandl.jl (a great contribution, by >> the way!) >> >> Everything works fine when I use it in a straightforward way: >> >> julia> mydat = quandl("GOOG/NASDAQ_GOOG",rows=100,format="DataFrame") >> 100x6 DataFrames.DataFrame >> | Row | Date | Open | High | Low| Close | Volume| >> |-||||||---| >> | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | >> | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | >> | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | >> >> >> or when I do: >> >> julia> myid = "GOOG/NASDAQ_GOOG" >> "GOOG/NASDAQ_GOOG" >> >> julia> typeof(myid) >> ASCIIString >> >> julia> mydat = quandl(myid,rows=100,format="DataFrame") >> 100x6 DataFrames.DataFrame >> | Row | Date | Open | High | Low| Close | Volume| >> |-||||||---| >> | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | >> | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | >> | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | >> >> >> However, I get an error when I read my data from an external file. >> Assume I have an ascii file containing only one line: >> >> $ echo "GOOG/NASDAQ_GOOG" > portfolio.txt >> >> $ cat portfolio.txt >> GOOG/NASDAQ_GOOG >> >> >> I just read the content of this file by using readdlm and try to use >> it to call the same function quandl, but it does not work. >> >> julia> myportfolio = readdlm("./portfolio.txt",'\n') >> 1x1 Array{Any,2}: >> "GOOG/NASDAQ_GOOG" >> >> julia> typeof(myportfolio[1]) >> SubString{ASCIIString} >> >> julia> mydat = quandl(myportfoli
Re: [julia-users] Adding 1 to an Array{Array{Int64,1},1}
Chris Very strange. I get (Julia 0.4.2-pre+20 *julia> **a = [2 for i in 1:2, j in 1:2]* *2x2 Array{Int64,2}:* * 2 2* * 2 2* *julia> **b = copy(a)[:,:] + 1* *2x2 Array{Int64,2}:* * 3 3* * 3 3* -erik On Fri, Dec 4, 2015 at 9:26 PM, Chris <7hunderstr...@gmail.com> wrote: > Thanks for your suggestion, Charles. That certainly works, but something a > little more general would be nice. > > Erik, copy(a)[:] + 1 still gives me an Array{Any,1}. > > Chris > > On Friday, December 4, 2015 at 9:09:46 PM UTC-5, Erik Schnetter wrote: >> >> You can write >> >> copy(a)[:] + 1 >> >> The expression `a + 1` implicitly makes a copy of the array, adding one >> to each element. The expression above does the same, but is more explicit >> about the indexing, and thus keeps the types the same. In particular, my >> expression >> - first makes a copy of `a` >> - then adds `1`, element-wise (thus not changing the array type >> - then returns the array >> >> -erik >> >> >> On Fri, Dec 4, 2015 at 8:48 PM, Charles Novaes de Santana < >> charles...@gmail.com> wrote: >> >>> As you probably noted, I suggested a wrong function :( Sorry, I copied >>> and pasted and didn't read >>> >>> here is the function I would like to suggest you: >>> >>> julia> function newsum(a::Array{Array{Int64,1},1}, i::Int) >>>lengtha = size(a,1); >>>return(a + [[i,i] for j = 1:lengtha]) >>>end >>> newsum (generic function with 1 method) >>> >>> julia> newsum(a,1) >>> 5-element Array{Array{Int64,1},1}: >>> [2,2] >>> [2,2] >>> [2,2] >>> [2,2] >>> [2,2] >>> >>> best, >>> >>> Charles >>> >>> >>> On 5 December 2015 at 02:45, Charles Novaes de Santana < >>> charles...@gmail.com> wrote: >>> Hi Chris, Unfortunately I don't know why the type changes from Array{Array{Int64,1},1} to Array{Any,1}. But I have a suggestion to what you can do to keep it as Array{Array{Int64,1},1}. My initial shot would be to do a + [[1,1] for i = 1:5] instead of a + 1 : julia> a + [[1,1] for i = 1:5] 5-element Array{Array{Int64,1},1}: [2,2] [2,2] [2,2] [2,2] [2,2] Or, if you want to simplify the way you do it, just define a function like this: julia> function newsum(a::Array{Array{Int64,1},1}, i::Int) lengtha = size(a,1); return([[i,i] for i = 1:lengtha]) end newsum (generic function with 1 method) julia> newsum(a,1) 5-element Array{Array{Int64,1},1}: [1,1] [2,2] [3,3] [4,4] [5,5] But I am sure you will find many more suggestions here! ;) Best, Charles On 5 December 2015 at 02:16, Chris <7hunde...@gmail.com> wrote: > I am confused about the following: > > julia> a = [[1,1] for i = 1:5] > 5-element Array{Array{Int64,1},1}: > [1,1] > [1,1] > [1,1] > [1,1] > [1,1] > > julia> a + 1 > 5-element Array{Any,1}: > [2,2] > [2,2] > [2,2] > [2,2] > [2,2] > > Specifically, why does the type change from Array{Array{Int64,1},1} to > Array{Any,1}, and what can I do to keep it as Array{Array{Int64,1},1}? > > Thanks, > Chris > -- Um axé! :) -- Charles Novaes de Santana, PhD http://www.imedea.uib-csic.es/~charles >>> >>> >>> >>> -- >>> Um axé! :) >>> >>> -- >>> Charles Novaes de Santana, PhD >>> http://www.imedea.uib-csic.es/~charles >>> >> >> >> >> -- >> Erik Schnetter >> http://www.perimeterinstitute.ca/personal/eschnetter/ >> > -- Erik Schnetter http://www.perimeterinstitute.ca/personal/eschnetter/
[julia-users] Re: Adding 1 to an Array{Array{Int64,1},1}
The problem is that Julia doesn't have a type-promotion rule for this. In particular: Base.promote_op(Base.DotAddFun(), Int, Array{Int64,1}) returns Any. This probably be fixed by adding appropriate new promote_op methods to Base (pull requests are welcome).
Re: [julia-users] Adding 1 to an Array{Array{Int64,1},1}
Thanks for your suggestion, Charles. That certainly works, but something a little more general would be nice. Erik, copy(a)[:] + 1 still gives me an Array{Any,1}. Chris On Friday, December 4, 2015 at 9:09:46 PM UTC-5, Erik Schnetter wrote: > > You can write > > copy(a)[:] + 1 > > The expression `a + 1` implicitly makes a copy of the array, adding one to > each element. The expression above does the same, but is more explicit > about the indexing, and thus keeps the types the same. In particular, my > expression > - first makes a copy of `a` > - then adds `1`, element-wise (thus not changing the array type > - then returns the array > > -erik > > > On Fri, Dec 4, 2015 at 8:48 PM, Charles Novaes de Santana < > charles...@gmail.com > wrote: > >> As you probably noted, I suggested a wrong function :( Sorry, I copied >> and pasted and didn't read >> >> here is the function I would like to suggest you: >> >> julia> function newsum(a::Array{Array{Int64,1},1}, i::Int) >>lengtha = size(a,1); >>return(a + [[i,i] for j = 1:lengtha]) >>end >> newsum (generic function with 1 method) >> >> julia> newsum(a,1) >> 5-element Array{Array{Int64,1},1}: >> [2,2] >> [2,2] >> [2,2] >> [2,2] >> [2,2] >> >> best, >> >> Charles >> >> >> On 5 December 2015 at 02:45, Charles Novaes de Santana < >> charles...@gmail.com > wrote: >> >>> Hi Chris, >>> >>> Unfortunately I don't know why the type changes from >>> Array{Array{Int64,1},1} >>> to Array{Any,1}. But I have a suggestion to what you can do to keep it as >>> Array{Array{Int64,1},1}. >>> >>> My initial shot would be to do a + [[1,1] for i = 1:5] instead of a + 1: >>> >>> julia> a + [[1,1] for i = 1:5] >>> 5-element Array{Array{Int64,1},1}: >>> [2,2] >>> [2,2] >>> [2,2] >>> [2,2] >>> [2,2] >>> >>> Or, if you want to simplify the way you do it, just define a function >>> like this: >>> >>> julia> function newsum(a::Array{Array{Int64,1},1}, i::Int) >>>lengtha = size(a,1); >>>return([[i,i] for i = 1:lengtha]) >>>end >>> newsum (generic function with 1 method) >>> >>> julia> newsum(a,1) >>> 5-element Array{Array{Int64,1},1}: >>> [1,1] >>> [2,2] >>> [3,3] >>> [4,4] >>> [5,5] >>> >>> But I am sure you will find many more suggestions here! ;) >>> >>> Best, >>> >>> Charles >>> >>> On 5 December 2015 at 02:16, Chris <7hunde...@gmail.com > >>> wrote: >>> I am confused about the following: julia> a = [[1,1] for i = 1:5] 5-element Array{Array{Int64,1},1}: [1,1] [1,1] [1,1] [1,1] [1,1] julia> a + 1 5-element Array{Any,1}: [2,2] [2,2] [2,2] [2,2] [2,2] Specifically, why does the type change from Array{Array{Int64,1},1} to Array{Any,1}, and what can I do to keep it as Array{Array{Int64,1},1}? Thanks, Chris >>> >>> >>> >>> -- >>> Um axé! :) >>> >>> -- >>> Charles Novaes de Santana, PhD >>> http://www.imedea.uib-csic.es/~charles >>> >> >> >> >> -- >> Um axé! :) >> >> -- >> Charles Novaes de Santana, PhD >> http://www.imedea.uib-csic.es/~charles >> > > > > -- > Erik Schnetter > > http://www.perimeterinstitute.ca/personal/eschnetter/ >
Re: [julia-users] Adding 1 to an Array{Array{Int64,1},1}
You can write copy(a)[:] + 1 The expression `a + 1` implicitly makes a copy of the array, adding one to each element. The expression above does the same, but is more explicit about the indexing, and thus keeps the types the same. In particular, my expression - first makes a copy of `a` - then adds `1`, element-wise (thus not changing the array type - then returns the array -erik On Fri, Dec 4, 2015 at 8:48 PM, Charles Novaes de Santana < charles.sant...@gmail.com> wrote: > As you probably noted, I suggested a wrong function :( Sorry, I copied and > pasted and didn't read > > here is the function I would like to suggest you: > > julia> function newsum(a::Array{Array{Int64,1},1}, i::Int) >lengtha = size(a,1); >return(a + [[i,i] for j = 1:lengtha]) >end > newsum (generic function with 1 method) > > julia> newsum(a,1) > 5-element Array{Array{Int64,1},1}: > [2,2] > [2,2] > [2,2] > [2,2] > [2,2] > > best, > > Charles > > > On 5 December 2015 at 02:45, Charles Novaes de Santana < > charles.sant...@gmail.com> wrote: > >> Hi Chris, >> >> Unfortunately I don't know why the type changes from Array{Array{Int64,1},1} >> to Array{Any,1}. But I have a suggestion to what you can do to keep it as >> Array{Array{Int64,1},1}. >> >> My initial shot would be to do a + [[1,1] for i = 1:5] instead of a + 1: >> >> julia> a + [[1,1] for i = 1:5] >> 5-element Array{Array{Int64,1},1}: >> [2,2] >> [2,2] >> [2,2] >> [2,2] >> [2,2] >> >> Or, if you want to simplify the way you do it, just define a function >> like this: >> >> julia> function newsum(a::Array{Array{Int64,1},1}, i::Int) >>lengtha = size(a,1); >>return([[i,i] for i = 1:lengtha]) >>end >> newsum (generic function with 1 method) >> >> julia> newsum(a,1) >> 5-element Array{Array{Int64,1},1}: >> [1,1] >> [2,2] >> [3,3] >> [4,4] >> [5,5] >> >> But I am sure you will find many more suggestions here! ;) >> >> Best, >> >> Charles >> >> On 5 December 2015 at 02:16, Chris <7hunderstr...@gmail.com> wrote: >> >>> I am confused about the following: >>> >>> julia> a = [[1,1] for i = 1:5] >>> 5-element Array{Array{Int64,1},1}: >>> [1,1] >>> [1,1] >>> [1,1] >>> [1,1] >>> [1,1] >>> >>> julia> a + 1 >>> 5-element Array{Any,1}: >>> [2,2] >>> [2,2] >>> [2,2] >>> [2,2] >>> [2,2] >>> >>> Specifically, why does the type change from Array{Array{Int64,1},1} to >>> Array{Any,1}, and what can I do to keep it as Array{Array{Int64,1},1}? >>> >>> Thanks, >>> Chris >>> >> >> >> >> -- >> Um axé! :) >> >> -- >> Charles Novaes de Santana, PhD >> http://www.imedea.uib-csic.es/~charles >> > > > > -- > Um axé! :) > > -- > Charles Novaes de Santana, PhD > http://www.imedea.uib-csic.es/~charles > -- Erik Schnetter http://www.perimeterinstitute.ca/personal/eschnetter/
Re: [julia-users] Re: Convert SubString{ASCIIString} to String
Here it is late, so of course I forgive you the typo! :) But many thanks for the TIP! :) However, it doesn't seem to work here. My problem was that my matrix was composed by SubString{ASCIIString}. So, if I call typeof(myportfolio[1]) I get: julia> typeof(myportfolio[1]) SubString{ASCIIString} And the same if I call typeof(myportfolio[1,1]): julia> typeof(myportfolio[1,1]) SubString{ASCIIString} Could you please send the result of typeof(myportfolio[1]) in your example? I suppose it would be an ASCIIString. Seth's suggestion worked fine for me. To use a cast to ASCIIString to convert myportfolio[1], like this: julia> typeof(ASCIIString(myportfolio[1])) ASCIIString But thanks anyway! Best, Charles On 5 December 2015 at 01:46, Eric Forgy wrote: > It's early and I didn't finish my first cup of coffee yet, so forgive the > typo :) > > julia> myportfolio > 1x1 Array{Any,2}: > "GOOG/NASDAQ_GOOG" > > julia> myportfolio[1,1] > "GOOG/NASDAQ_GOOG" > > julia> typeof(myportfolio[1,1]) > ASCIIString > > > On Saturday, December 5, 2015 at 8:38:05 AM UTC+8, Eric Forgy wrote: >> >> Hi Charles, >> >> myportfolio is a Matrix, i.e. Array{Any,2}, so you need two indices to >> access it: >> >> julia> myportfolio >> 1x1 Array{Any,2}: >> "GOOG/NASDAQ_GOOD" >> >> julia> myportfolio[1,1] >> "GOOG/NASDAQ_GOOD" >> >> julia> typeof(myportfolio[1,1]) >> ASCIIString >> >> Best regards, >> Eric >> >> On Saturday, December 5, 2015 at 6:59:41 AM UTC+8, Charles Santana wrote: >>> >>> wow! That simple! Yes it works! >>> >>> Thanks, Seth! >>> >>> Charles >>> >>> On 4 December 2015 at 23:53, Seth wrote: >>> Maybe this will work for you? julia> a = "foobarbaz" "foobarbaz" julia> b = SubString(a,3,6) "obar" julia> typeof(b) SubString{ASCIIString} julia> c = ASCIIString(b) "obar" julia> typeof(c) ASCIIString On Friday, December 4, 2015 at 2:48:12 PM UTC-8, Charles Santana wrote: > > Hi people, > > Maybe it is a trivial question for most of you, but I really could not > find a way to solve my problem. > > I am using the function quandlget(id::ASCIIString) from the library > https://github.com/milktrader/Quandl.jl (a great contribution, by the > way!) > > Everything works fine when I use it in a straightforward way: > > julia> mydat = quandl("GOOG/NASDAQ_GOOG",rows=100,format="DataFrame") > 100x6 DataFrames.DataFrame > | Row | Date | Open | High | Low| Close | Volume| > |-||||||---| > | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | > | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | > | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | > > > or when I do: > > julia> myid = "GOOG/NASDAQ_GOOG" > "GOOG/NASDAQ_GOOG" > > julia> typeof(myid) > ASCIIString > > julia> mydat = quandl(myid,rows=100,format="DataFrame") > 100x6 DataFrames.DataFrame > | Row | Date | Open | High | Low| Close | Volume| > |-||||||---| > | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | > | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | > | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | > > > However, I get an error when I read my data from an external file. > Assume I have an ascii file containing only one line: > > $ echo "GOOG/NASDAQ_GOOG" > portfolio.txt > > $ cat portfolio.txt > GOOG/NASDAQ_GOOG > > > I just read the content of this file by using readdlm and try to use > it to call the same function quandl, but it does not work. > > julia> myportfolio = readdlm("./portfolio.txt",'\n') > 1x1 Array{Any,2}: > "GOOG/NASDAQ_GOOG" > > julia> typeof(myportfolio[1]) > SubString{ASCIIString} > > julia> mydat = quandl(myportfolio[1],rows=100,format="DataFrame") > ERROR: MethodError: `quandlget` has no method matching > quandlget(::SubString{ASCIIString}) > > > I suppose the easiest way to solve this problem is to convert my > SubString{ASCIIString} variable to ASCIIString. Am I right here? How can I > do it? > > Does any of you have another suggestion? May be I could read my data > in a different way instead of using readdlm? > > Thanks for any tip! > > best, > > Charles > -- > Um axé! :) > > -- > Charles Novaes de Santana, PhD > http://www.imedea.uib-csic.es/~charles > >>> >>> >>> -- >>> Um axé! :) >>> >>> -- >>> Charles Novaes de Santana, PhD >>> http://www.imedea.uib-csic.es/~charles >>> >> -- Um axé! :) -- Charles Novaes de Santana
Re: [julia-users] Adding 1 to an Array{Array{Int64,1},1}
As you probably noted, I suggested a wrong function :( Sorry, I copied and pasted and didn't read here is the function I would like to suggest you: julia> function newsum(a::Array{Array{Int64,1},1}, i::Int) lengtha = size(a,1); return(a + [[i,i] for j = 1:lengtha]) end newsum (generic function with 1 method) julia> newsum(a,1) 5-element Array{Array{Int64,1},1}: [2,2] [2,2] [2,2] [2,2] [2,2] best, Charles On 5 December 2015 at 02:45, Charles Novaes de Santana < charles.sant...@gmail.com> wrote: > Hi Chris, > > Unfortunately I don't know why the type changes from Array{Array{Int64,1},1} > to Array{Any,1}. But I have a suggestion to what you can do to keep it as > Array{Array{Int64,1},1}. > > My initial shot would be to do a + [[1,1] for i = 1:5] instead of a + 1: > > julia> a + [[1,1] for i = 1:5] > 5-element Array{Array{Int64,1},1}: > [2,2] > [2,2] > [2,2] > [2,2] > [2,2] > > Or, if you want to simplify the way you do it, just define a function like > this: > > julia> function newsum(a::Array{Array{Int64,1},1}, i::Int) >lengtha = size(a,1); >return([[i,i] for i = 1:lengtha]) >end > newsum (generic function with 1 method) > > julia> newsum(a,1) > 5-element Array{Array{Int64,1},1}: > [1,1] > [2,2] > [3,3] > [4,4] > [5,5] > > But I am sure you will find many more suggestions here! ;) > > Best, > > Charles > > On 5 December 2015 at 02:16, Chris <7hunderstr...@gmail.com> wrote: > >> I am confused about the following: >> >> julia> a = [[1,1] for i = 1:5] >> 5-element Array{Array{Int64,1},1}: >> [1,1] >> [1,1] >> [1,1] >> [1,1] >> [1,1] >> >> julia> a + 1 >> 5-element Array{Any,1}: >> [2,2] >> [2,2] >> [2,2] >> [2,2] >> [2,2] >> >> Specifically, why does the type change from Array{Array{Int64,1},1} to >> Array{Any,1}, and what can I do to keep it as Array{Array{Int64,1},1}? >> >> Thanks, >> Chris >> > > > > -- > Um axé! :) > > -- > Charles Novaes de Santana, PhD > http://www.imedea.uib-csic.es/~charles > -- Um axé! :) -- Charles Novaes de Santana, PhD http://www.imedea.uib-csic.es/~charles
Re: [julia-users] Adding 1 to an Array{Array{Int64,1},1}
Hi Chris, Unfortunately I don't know why the type changes from Array{Array{Int64,1},1} to Array{Any,1}. But I have a suggestion to what you can do to keep it as Array{Array{Int64,1},1}. My initial shot would be to do a + [[1,1] for i = 1:5] instead of a + 1: julia> a + [[1,1] for i = 1:5] 5-element Array{Array{Int64,1},1}: [2,2] [2,2] [2,2] [2,2] [2,2] Or, if you want to simplify the way you do it, just define a function like this: julia> function newsum(a::Array{Array{Int64,1},1}, i::Int) lengtha = size(a,1); return([[i,i] for i = 1:lengtha]) end newsum (generic function with 1 method) julia> newsum(a,1) 5-element Array{Array{Int64,1},1}: [1,1] [2,2] [3,3] [4,4] [5,5] But I am sure you will find many more suggestions here! ;) Best, Charles On 5 December 2015 at 02:16, Chris <7hunderstr...@gmail.com> wrote: > I am confused about the following: > > julia> a = [[1,1] for i = 1:5] > 5-element Array{Array{Int64,1},1}: > [1,1] > [1,1] > [1,1] > [1,1] > [1,1] > > julia> a + 1 > 5-element Array{Any,1}: > [2,2] > [2,2] > [2,2] > [2,2] > [2,2] > > Specifically, why does the type change from Array{Array{Int64,1},1} to > Array{Any,1}, and what can I do to keep it as Array{Array{Int64,1},1}? > > Thanks, > Chris > -- Um axé! :) -- Charles Novaes de Santana, PhD http://www.imedea.uib-csic.es/~charles
[julia-users] Adding 1 to an Array{Array{Int64,1},1}
I am confused about the following: julia> a = [[1,1] for i = 1:5] 5-element Array{Array{Int64,1},1}: [1,1] [1,1] [1,1] [1,1] [1,1] julia> a + 1 5-element Array{Any,1}: [2,2] [2,2] [2,2] [2,2] [2,2] Specifically, why does the type change from Array{Array{Int64,1},1} to Array{Any,1}, and what can I do to keep it as Array{Array{Int64,1},1}? Thanks, Chris
Re: [julia-users] Fwd: [ANN] Nemo 0.4 released!
It would be a great pleasure to help with this! I will keep it in my TODO list. But I have the same feeling as Eric (and I am sure most of us have it too). I need clones of myself to do collaborate in all the amazing projects we know everyday and still have a life :) I know some algebra teachers (that are not programming fans) that are looking for a way to make their classes more interesting, and a notebook of this amazing library would be great. Let's see... Best, Charles On 5 December 2015 at 01:16, Bill Hart wrote: > Not yet Charles, but we plan to add some eventually (they take time to > write). Of course contributions are welcome. > > There's lots of examples in the documentation by the way. > > Bill. > > On Saturday, 5 December 2015 00:46:28 UTC+1, Charles Santana wrote: >> >> Amazing!! Congratulations to all of you!! >> >> One question: Is there any IJulia notebook about Nemo? >> >> Thanks, >> >> Charles >> >> On 4 December 2015 at 23:50, 'Bill Hart' via julia-users < >> julia...@googlegroups.com> wrote: >> >>> >>> Hi all, >>> >>> It is with great pleasure that we release Nemo-0.4. >>> >>> Nemo is a computer algebra package written in the Julia programming >>> language, with the eventual aim of covering commutative algebra, number >>> theory and group theory. >>> >>> For instructions on getting and using Nemo-0.4, including full >>> documentation see: >>> >>> http://nemocas.org/downloads.html >>> >>> One of the things we've worked really hard on in this release is >>> fleshing out the generic matrix algorithms over rings, including fast >>> generic algorithms for: >>> >>> * LU factorisation >>> * reduced row echelon form >>> * determinant >>> * rank >>> * linear solving >>> * upper triangular solving >>> * matrix inverse >>> * (vector space) nullspace >>> * hessenberg form >>> * characteristic polynomial >>> * minimal polynomial >>> >>> Most of these algorithms now have specialisations for generic matrices >>> over fields in addition to the more generic version for general commutative >>> rings, with further specialisations in some cases for the integers or for >>> rings where there is coefficient explosion, e.g. with modular, >>> interpolation or fraction free algorithms. >>> >>> Numerous benchmarks have been added to our benchmarks page to show that >>> these implementations are competitive with other systems. >>> >>> http://nemocas.org/benchmarks.html >>> >>> Some other improvements in Nemo-0.4 include: >>> >>> * Arb is now available on Windows 64 >>> * OSX build is more reliable (>= 1 successful build report on OSX El >>> Capitan) >>> * better handling of rpaths on Linux >>> * build Pari in single threaded mode (slight speedup) >>> * wrap Flint's Howell form >>> * update to MPIR-2.7.2 >>> * upgrade to MPFR-3.1.3 >>> * better catching of impossible inverses >>> * random similarity transforms (for test code) >>> * baby-steps giant-steps generic polynomial subst >>> * Z["x"] polynomial ring syntax supported >>> * R[a, b c] matrix syntax supported for Nemo types >>> * conversion to and from Newton bases >>> * wrap Flint permutations >>> * rename Collection to Nemo.Set >>> * added Nemo.Group abstract type >>> * big speedups for polynomial resultant and Euclidean division >>> * multinomial powering >>> * update to Julia-0.4.1 (no changes required) >>> * many small helper functions and bug fixes >>> >>> The main contributors to this release were: >>> >>> * William Hart >>> * Tommy Hofmann >>> * Claus Fieker >>> * Fredrik Johansson. >>> >>> A number of others contributed to build testing. >>> >>> We've actually been working on Nemo-0.5 in parallel, so this should be >>> released in January. >>> >>> If anyone is interested in learning Julia or contributing to Nemo, >>> there's a list of interesting projects on our development page: >>> >>> http://nemocas.org/development.html >>> >>> We've focused here on projects that might be interesting for CS or Maths >>> students to implement or which might make interesting open ended research >>> projects, (as opposed to small bits and pieces of maintenance, which we've >>> confined to our todo.txt). >>> >>> Suggestions of additional projects are also very welcome. >>> >>> Enjoy!! >>> >>> And please do let us know of successful/unsuccessful builds. >>> >>> Best Wishes, >>> >>> Bill Hart >>> Tommy Hofmann >>> Claus Fieker >>> Fredrik Johansson >>> >>> >> >> >> -- >> Um axé! :) >> >> -- >> Charles Novaes de Santana, PhD >> http://www.imedea.uib-csic.es/~charles >> > -- Um axé! :) -- Charles Novaes de Santana, PhD http://www.imedea.uib-csic.es/~charles
Re: [julia-users] Fwd: [ANN] Nemo 0.4 released!
It would be a great pleasure to help with this! I will keep it in my TODO list. But I have the same feeling as Eric (and I am sure most of us have it too). I need clones of myself to do collaborate in all the amazing projects we know everyday and still have a life :) I know some algebra teachers (that are not programming fans) that are looking for a way to make their classes more interesting, and a notebook of this amazing library would be great. Let's see... Best, Charles On 5 December 2015 at 01:16, Bill Hart wrote: > Not yet Charles, but we plan to add some eventually (they take time to > write). Of course contributions are welcome. > > There's lots of examples in the documentation by the way. > > Bill. > > On Saturday, 5 December 2015 00:46:28 UTC+1, Charles Santana wrote: >> >> Amazing!! Congratulations to all of you!! >> >> One question: Is there any IJulia notebook about Nemo? >> >> Thanks, >> >> Charles >> >> On 4 December 2015 at 23:50, 'Bill Hart' via julia-users < >> julia...@googlegroups.com> wrote: >> >>> >>> Hi all, >>> >>> It is with great pleasure that we release Nemo-0.4. >>> >>> Nemo is a computer algebra package written in the Julia programming >>> language, with the eventual aim of covering commutative algebra, number >>> theory and group theory. >>> >>> For instructions on getting and using Nemo-0.4, including full >>> documentation see: >>> >>> http://nemocas.org/downloads.html >>> >>> One of the things we've worked really hard on in this release is >>> fleshing out the generic matrix algorithms over rings, including fast >>> generic algorithms for: >>> >>> * LU factorisation >>> * reduced row echelon form >>> * determinant >>> * rank >>> * linear solving >>> * upper triangular solving >>> * matrix inverse >>> * (vector space) nullspace >>> * hessenberg form >>> * characteristic polynomial >>> * minimal polynomial >>> >>> Most of these algorithms now have specialisations for generic matrices >>> over fields in addition to the more generic version for general commutative >>> rings, with further specialisations in some cases for the integers or for >>> rings where there is coefficient explosion, e.g. with modular, >>> interpolation or fraction free algorithms. >>> >>> Numerous benchmarks have been added to our benchmarks page to show that >>> these implementations are competitive with other systems. >>> >>> http://nemocas.org/benchmarks.html >>> >>> Some other improvements in Nemo-0.4 include: >>> >>> * Arb is now available on Windows 64 >>> * OSX build is more reliable (>= 1 successful build report on OSX El >>> Capitan) >>> * better handling of rpaths on Linux >>> * build Pari in single threaded mode (slight speedup) >>> * wrap Flint's Howell form >>> * update to MPIR-2.7.2 >>> * upgrade to MPFR-3.1.3 >>> * better catching of impossible inverses >>> * random similarity transforms (for test code) >>> * baby-steps giant-steps generic polynomial subst >>> * Z["x"] polynomial ring syntax supported >>> * R[a, b c] matrix syntax supported for Nemo types >>> * conversion to and from Newton bases >>> * wrap Flint permutations >>> * rename Collection to Nemo.Set >>> * added Nemo.Group abstract type >>> * big speedups for polynomial resultant and Euclidean division >>> * multinomial powering >>> * update to Julia-0.4.1 (no changes required) >>> * many small helper functions and bug fixes >>> >>> The main contributors to this release were: >>> >>> * William Hart >>> * Tommy Hofmann >>> * Claus Fieker >>> * Fredrik Johansson. >>> >>> A number of others contributed to build testing. >>> >>> We've actually been working on Nemo-0.5 in parallel, so this should be >>> released in January. >>> >>> If anyone is interested in learning Julia or contributing to Nemo, >>> there's a list of interesting projects on our development page: >>> >>> http://nemocas.org/development.html >>> >>> We've focused here on projects that might be interesting for CS or Maths >>> students to implement or which might make interesting open ended research >>> projects, (as opposed to small bits and pieces of maintenance, which we've >>> confined to our todo.txt). >>> >>> Suggestions of additional projects are also very welcome. >>> >>> Enjoy!! >>> >>> And please do let us know of successful/unsuccessful builds. >>> >>> Best Wishes, >>> >>> Bill Hart >>> Tommy Hofmann >>> Claus Fieker >>> Fredrik Johansson >>> >>> >> >> >> -- >> Um axé! :) >> >> -- >> Charles Novaes de Santana, PhD >> http://www.imedea.uib-csic.es/~charles >> > -- Um axé! :) -- Charles Novaes de Santana, PhD http://www.imedea.uib-csic.es/~charles
Re: [julia-users] Fwd: [ANN] Nemo 0.4 released!
I should add that one thing that number theorists are very interested in is quaternion algebras, especially over number fields. I hope that will eventually be done well in Nemo. Bill. On 5 December 2015 at 01:42, Bill Hart wrote: > > > On 5 December 2015 at 01:27, Eric Forgy wrote: > >> Numerous benchmarks have been added to our benchmarks page to show that >>> these implementations are competitive with other systems. >> >> >> Looking at the numbers, I call this an understatement :) >> > > Yes, but we are cheating by using the Julia programming language. :-) > > >> >> Very cool. Any interest in noncommutative (differential) algebras? >> > > There might be some interest in this. In general we aren't (yet) > interested in non-commutative rings, but for example we have matrices and > somehow noncommutative algebras seem to get covered eventually in that > direction. > > >> This has been on my mind for a while and could have lots of applications, >> but I would have to clone myself at least 3 times before I'd have the time >> to look into it :) >> > > Well, I certainly appreciate that feeling. Let us know though if we can be > of any assistance if you do eventually need to implement these for a > particular application. > > Bill. >
Re: [julia-users] Re: Convert SubString{ASCIIString} to String
It's early and I didn't finish my first cup of coffee yet, so forgive the typo :) julia> myportfolio 1x1 Array{Any,2}: "GOOG/NASDAQ_GOOG" julia> myportfolio[1,1] "GOOG/NASDAQ_GOOG" julia> typeof(myportfolio[1,1]) ASCIIString On Saturday, December 5, 2015 at 8:38:05 AM UTC+8, Eric Forgy wrote: > > Hi Charles, > > myportfolio is a Matrix, i.e. Array{Any,2}, so you need two indices to > access it: > > julia> myportfolio > 1x1 Array{Any,2}: > "GOOG/NASDAQ_GOOD" > > julia> myportfolio[1,1] > "GOOG/NASDAQ_GOOD" > > julia> typeof(myportfolio[1,1]) > ASCIIString > > Best regards, > Eric > > On Saturday, December 5, 2015 at 6:59:41 AM UTC+8, Charles Santana wrote: >> >> wow! That simple! Yes it works! >> >> Thanks, Seth! >> >> Charles >> >> On 4 December 2015 at 23:53, Seth wrote: >> >>> Maybe this will work for you? >>> >>> julia> a = "foobarbaz" >>> "foobarbaz" >>> >>> julia> b = SubString(a,3,6) >>> "obar" >>> >>> julia> typeof(b) >>> SubString{ASCIIString} >>> >>> julia> c = ASCIIString(b) >>> "obar" >>> >>> julia> typeof(c) >>> ASCIIString >>> >>> >>> >>> On Friday, December 4, 2015 at 2:48:12 PM UTC-8, Charles Santana wrote: Hi people, Maybe it is a trivial question for most of you, but I really could not find a way to solve my problem. I am using the function quandlget(id::ASCIIString) from the library https://github.com/milktrader/Quandl.jl (a great contribution, by the way!) Everything works fine when I use it in a straightforward way: julia> mydat = quandl("GOOG/NASDAQ_GOOG",rows=100,format="DataFrame") 100x6 DataFrames.DataFrame | Row | Date | Open | High | Low| Close | Volume| |-||||||---| | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | or when I do: julia> myid = "GOOG/NASDAQ_GOOG" "GOOG/NASDAQ_GOOG" julia> typeof(myid) ASCIIString julia> mydat = quandl(myid,rows=100,format="DataFrame") 100x6 DataFrames.DataFrame | Row | Date | Open | High | Low| Close | Volume| |-||||||---| | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | However, I get an error when I read my data from an external file. Assume I have an ascii file containing only one line: $ echo "GOOG/NASDAQ_GOOG" > portfolio.txt $ cat portfolio.txt GOOG/NASDAQ_GOOG I just read the content of this file by using readdlm and try to use it to call the same function quandl, but it does not work. julia> myportfolio = readdlm("./portfolio.txt",'\n') 1x1 Array{Any,2}: "GOOG/NASDAQ_GOOG" julia> typeof(myportfolio[1]) SubString{ASCIIString} julia> mydat = quandl(myportfolio[1],rows=100,format="DataFrame") ERROR: MethodError: `quandlget` has no method matching quandlget(::SubString{ASCIIString}) I suppose the easiest way to solve this problem is to convert my SubString{ASCIIString} variable to ASCIIString. Am I right here? How can I do it? Does any of you have another suggestion? May be I could read my data in a different way instead of using readdlm? Thanks for any tip! best, Charles -- Um axé! :) -- Charles Novaes de Santana, PhD http://www.imedea.uib-csic.es/~charles >>> >> >> >> -- >> Um axé! :) >> >> -- >> Charles Novaes de Santana, PhD >> http://www.imedea.uib-csic.es/~charles >> >
Re: [julia-users] Fwd: [ANN] Nemo 0.4 released!
On 5 December 2015 at 01:27, Eric Forgy wrote: > Numerous benchmarks have been added to our benchmarks page to show that >> these implementations are competitive with other systems. > > > Looking at the numbers, I call this an understatement :) > Yes, but we are cheating by using the Julia programming language. :-) > > Very cool. Any interest in noncommutative (differential) algebras? > There might be some interest in this. In general we aren't (yet) interested in non-commutative rings, but for example we have matrices and somehow noncommutative algebras seem to get covered eventually in that direction. > This has been on my mind for a while and could have lots of applications, > but I would have to clone myself at least 3 times before I'd have the time > to look into it :) > Well, I certainly appreciate that feeling. Let us know though if we can be of any assistance if you do eventually need to implement these for a particular application. Bill.
Re: [julia-users] Re: Convert SubString{ASCIIString} to String
Hi Charles, myportfolio is a Matrix, i.e. Array{Any,2}, so you need two indices to access it: julia> myportfolio 1x1 Array{Any,2}: "GOOG/NASDAQ_GOOD" julia> myportfolio[1,1] "GOOG/NASDAQ_GOOD" julia> typeof(myportfolio[1,1]) ASCIIString Best regards, Eric On Saturday, December 5, 2015 at 6:59:41 AM UTC+8, Charles Santana wrote: > > wow! That simple! Yes it works! > > Thanks, Seth! > > Charles > > On 4 December 2015 at 23:53, Seth > > wrote: > >> Maybe this will work for you? >> >> julia> a = "foobarbaz" >> "foobarbaz" >> >> julia> b = SubString(a,3,6) >> "obar" >> >> julia> typeof(b) >> SubString{ASCIIString} >> >> julia> c = ASCIIString(b) >> "obar" >> >> julia> typeof(c) >> ASCIIString >> >> >> >> On Friday, December 4, 2015 at 2:48:12 PM UTC-8, Charles Santana wrote: >>> >>> Hi people, >>> >>> Maybe it is a trivial question for most of you, but I really could not >>> find a way to solve my problem. >>> >>> I am using the function quandlget(id::ASCIIString) from the library >>> https://github.com/milktrader/Quandl.jl (a great contribution, by the >>> way!) >>> >>> Everything works fine when I use it in a straightforward way: >>> >>> julia> mydat = quandl("GOOG/NASDAQ_GOOG",rows=100,format="DataFrame") >>> 100x6 DataFrames.DataFrame >>> | Row | Date | Open | High | Low| Close | Volume| >>> |-||||||---| >>> | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | >>> | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | >>> | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | >>> >>> >>> or when I do: >>> >>> julia> myid = "GOOG/NASDAQ_GOOG" >>> "GOOG/NASDAQ_GOOG" >>> >>> julia> typeof(myid) >>> ASCIIString >>> >>> julia> mydat = quandl(myid,rows=100,format="DataFrame") >>> 100x6 DataFrames.DataFrame >>> | Row | Date | Open | High | Low| Close | Volume| >>> |-||||||---| >>> | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | >>> | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | >>> | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | >>> >>> >>> However, I get an error when I read my data from an external file. >>> Assume I have an ascii file containing only one line: >>> >>> $ echo "GOOG/NASDAQ_GOOG" > portfolio.txt >>> >>> $ cat portfolio.txt >>> GOOG/NASDAQ_GOOG >>> >>> >>> I just read the content of this file by using readdlm and try to use it >>> to call the same function quandl, but it does not work. >>> >>> julia> myportfolio = readdlm("./portfolio.txt",'\n') >>> 1x1 Array{Any,2}: >>> "GOOG/NASDAQ_GOOG" >>> >>> julia> typeof(myportfolio[1]) >>> SubString{ASCIIString} >>> >>> julia> mydat = quandl(myportfolio[1],rows=100,format="DataFrame") >>> ERROR: MethodError: `quandlget` has no method matching >>> quandlget(::SubString{ASCIIString}) >>> >>> >>> I suppose the easiest way to solve this problem is to convert my >>> SubString{ASCIIString} variable to ASCIIString. Am I right here? How can I >>> do it? >>> >>> Does any of you have another suggestion? May be I could read my data in >>> a different way instead of using readdlm? >>> >>> Thanks for any tip! >>> >>> best, >>> >>> Charles >>> -- >>> Um axé! :) >>> >>> -- >>> Charles Novaes de Santana, PhD >>> http://www.imedea.uib-csic.es/~charles >>> >> > > > -- > Um axé! :) > > -- > Charles Novaes de Santana, PhD > http://www.imedea.uib-csic.es/~charles >
[julia-users] Re: Can somebody provide an advice as to how to fix this?
I just ran Juliabox and found it working. On Friday, December 4, 2015 at 3:22:23 PM UTC-5, Arin Basu wrote: > > I posted the "internal server error: 500" on juliabox discussion group, > but it did not work. There was one response asking me to fix the SSH key. > > Is it something to be fixed by the Juliabox team, or is it something to do > with my browsers? I tried Safari (Mac), Google Chrome (Windows), and > Internet Explorer (Windows). I get the same message everywhere. Yet a week > ago, it worked perfectly! > > Would be good to have this feature back. Sorry for posting to a wrong > discussion group, just hoping someone may have a good answer, as this is a > highly responsive group, :-) > > Best, > Arin >
[julia-users] Re: what's the easiest way to force a recompilation?
Base.compilecache On Friday, December 4, 2015 at 2:50:03 PM UTC-8, Seth wrote: > > I'd rather not alter any of the source files. Is there a Pkg command that > will recompile? (Pkg.build() doesn't seem to do it). >
Re: [julia-users] Fwd: [ANN] Nemo 0.4 released!
> > Numerous benchmarks have been added to our benchmarks page to show that > these implementations are competitive with other systems. Looking at the numbers, I call this an understatement :) Very cool. Any interest in noncommutative (differential) algebras? This has been on my mind for a while and could have lots of applications, but I would have to clone myself at least 3 times before I'd have the time to look into it :)
Re: [julia-users] Fwd: [ANN] Nemo 0.4 released!
Not yet Charles, but we plan to add some eventually (they take time to write). Of course contributions are welcome. There's lots of examples in the documentation by the way. Bill. On Saturday, 5 December 2015 00:46:28 UTC+1, Charles Santana wrote: > > Amazing!! Congratulations to all of you!! > > One question: Is there any IJulia notebook about Nemo? > > Thanks, > > Charles > > On 4 December 2015 at 23:50, 'Bill Hart' via julia-users < > julia...@googlegroups.com > wrote: > >> >> Hi all, >> >> It is with great pleasure that we release Nemo-0.4. >> >> Nemo is a computer algebra package written in the Julia programming >> language, with the eventual aim of covering commutative algebra, number >> theory and group theory. >> >> For instructions on getting and using Nemo-0.4, including full >> documentation see: >> >> http://nemocas.org/downloads.html >> >> One of the things we've worked really hard on in this release is fleshing >> out the generic matrix algorithms over rings, including fast generic >> algorithms for: >> >> * LU factorisation >> * reduced row echelon form >> * determinant >> * rank >> * linear solving >> * upper triangular solving >> * matrix inverse >> * (vector space) nullspace >> * hessenberg form >> * characteristic polynomial >> * minimal polynomial >> >> Most of these algorithms now have specialisations for generic matrices >> over fields in addition to the more generic version for general commutative >> rings, with further specialisations in some cases for the integers or for >> rings where there is coefficient explosion, e.g. with modular, >> interpolation or fraction free algorithms. >> >> Numerous benchmarks have been added to our benchmarks page to show that >> these implementations are competitive with other systems. >> >> http://nemocas.org/benchmarks.html >> >> Some other improvements in Nemo-0.4 include: >> >> * Arb is now available on Windows 64 >> * OSX build is more reliable (>= 1 successful build report on OSX El >> Capitan) >> * better handling of rpaths on Linux >> * build Pari in single threaded mode (slight speedup) >> * wrap Flint's Howell form >> * update to MPIR-2.7.2 >> * upgrade to MPFR-3.1.3 >> * better catching of impossible inverses >> * random similarity transforms (for test code) >> * baby-steps giant-steps generic polynomial subst >> * Z["x"] polynomial ring syntax supported >> * R[a, b c] matrix syntax supported for Nemo types >> * conversion to and from Newton bases >> * wrap Flint permutations >> * rename Collection to Nemo.Set >> * added Nemo.Group abstract type >> * big speedups for polynomial resultant and Euclidean division >> * multinomial powering >> * update to Julia-0.4.1 (no changes required) >> * many small helper functions and bug fixes >> >> The main contributors to this release were: >> >> * William Hart >> * Tommy Hofmann >> * Claus Fieker >> * Fredrik Johansson. >> >> A number of others contributed to build testing. >> >> We've actually been working on Nemo-0.5 in parallel, so this should be >> released in January. >> >> If anyone is interested in learning Julia or contributing to Nemo, >> there's a list of interesting projects on our development page: >> >> http://nemocas.org/development.html >> >> We've focused here on projects that might be interesting for CS or Maths >> students to implement or which might make interesting open ended research >> projects, (as opposed to small bits and pieces of maintenance, which we've >> confined to our todo.txt). >> >> Suggestions of additional projects are also very welcome. >> >> Enjoy!! >> >> And please do let us know of successful/unsuccessful builds. >> >> Best Wishes, >> >> Bill Hart >> Tommy Hofmann >> Claus Fieker >> Fredrik Johansson >> >> > > > -- > Um axé! :) > > -- > Charles Novaes de Santana, PhD > http://www.imedea.uib-csic.es/~charles >
Re: [julia-users] Fwd: [ANN] Nemo 0.4 released!
Amazing!! Congratulations to all of you!! One question: Is there any IJulia notebook about Nemo? Thanks, Charles On 4 December 2015 at 23:50, 'Bill Hart' via julia-users < julia-users@googlegroups.com> wrote: > > Hi all, > > It is with great pleasure that we release Nemo-0.4. > > Nemo is a computer algebra package written in the Julia programming > language, with the eventual aim of covering commutative algebra, number > theory and group theory. > > For instructions on getting and using Nemo-0.4, including full > documentation see: > > http://nemocas.org/downloads.html > > One of the things we've worked really hard on in this release is fleshing > out the generic matrix algorithms over rings, including fast generic > algorithms for: > > * LU factorisation > * reduced row echelon form > * determinant > * rank > * linear solving > * upper triangular solving > * matrix inverse > * (vector space) nullspace > * hessenberg form > * characteristic polynomial > * minimal polynomial > > Most of these algorithms now have specialisations for generic matrices > over fields in addition to the more generic version for general commutative > rings, with further specialisations in some cases for the integers or for > rings where there is coefficient explosion, e.g. with modular, > interpolation or fraction free algorithms. > > Numerous benchmarks have been added to our benchmarks page to show that > these implementations are competitive with other systems. > > http://nemocas.org/benchmarks.html > > Some other improvements in Nemo-0.4 include: > > * Arb is now available on Windows 64 > * OSX build is more reliable (>= 1 successful build report on OSX El > Capitan) > * better handling of rpaths on Linux > * build Pari in single threaded mode (slight speedup) > * wrap Flint's Howell form > * update to MPIR-2.7.2 > * upgrade to MPFR-3.1.3 > * better catching of impossible inverses > * random similarity transforms (for test code) > * baby-steps giant-steps generic polynomial subst > * Z["x"] polynomial ring syntax supported > * R[a, b c] matrix syntax supported for Nemo types > * conversion to and from Newton bases > * wrap Flint permutations > * rename Collection to Nemo.Set > * added Nemo.Group abstract type > * big speedups for polynomial resultant and Euclidean division > * multinomial powering > * update to Julia-0.4.1 (no changes required) > * many small helper functions and bug fixes > > The main contributors to this release were: > > * William Hart > * Tommy Hofmann > * Claus Fieker > * Fredrik Johansson. > > A number of others contributed to build testing. > > We've actually been working on Nemo-0.5 in parallel, so this should be > released in January. > > If anyone is interested in learning Julia or contributing to Nemo, there's > a list of interesting projects on our development page: > > http://nemocas.org/development.html > > We've focused here on projects that might be interesting for CS or Maths > students to implement or which might make interesting open ended research > projects, (as opposed to small bits and pieces of maintenance, which we've > confined to our todo.txt). > > Suggestions of additional projects are also very welcome. > > Enjoy!! > > And please do let us know of successful/unsuccessful builds. > > Best Wishes, > > Bill Hart > Tommy Hofmann > Claus Fieker > Fredrik Johansson > > -- Um axé! :) -- Charles Novaes de Santana, PhD http://www.imedea.uib-csic.es/~charles
[julia-users] Re: what's the easiest way to force a recompilation?
Remove the .ji file in .julia/v0.4/.cache; next time you import the package, it's re-compiled. // T On Friday, December 4, 2015 at 11:50:03 PM UTC+1, Seth wrote: > > I'd rather not alter any of the source files. Is there a Pkg command that > will recompile? (Pkg.build() doesn't seem to do it). >
Re: [julia-users] Re: Convert SubString{ASCIIString} to String
wow! That simple! Yes it works! Thanks, Seth! Charles On 4 December 2015 at 23:53, Seth wrote: > Maybe this will work for you? > > julia> a = "foobarbaz" > "foobarbaz" > > julia> b = SubString(a,3,6) > "obar" > > julia> typeof(b) > SubString{ASCIIString} > > julia> c = ASCIIString(b) > "obar" > > julia> typeof(c) > ASCIIString > > > > On Friday, December 4, 2015 at 2:48:12 PM UTC-8, Charles Santana wrote: >> >> Hi people, >> >> Maybe it is a trivial question for most of you, but I really could not >> find a way to solve my problem. >> >> I am using the function quandlget(id::ASCIIString) from the library >> https://github.com/milktrader/Quandl.jl (a great contribution, by the >> way!) >> >> Everything works fine when I use it in a straightforward way: >> >> julia> mydat = quandl("GOOG/NASDAQ_GOOG",rows=100,format="DataFrame") >> 100x6 DataFrames.DataFrame >> | Row | Date | Open | High | Low| Close | Volume| >> |-||||||---| >> | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | >> | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | >> | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | >> >> >> or when I do: >> >> julia> myid = "GOOG/NASDAQ_GOOG" >> "GOOG/NASDAQ_GOOG" >> >> julia> typeof(myid) >> ASCIIString >> >> julia> mydat = quandl(myid,rows=100,format="DataFrame") >> 100x6 DataFrames.DataFrame >> | Row | Date | Open | High | Low| Close | Volume| >> |-||||||---| >> | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | >> | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | >> | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | >> >> >> However, I get an error when I read my data from an external file. Assume >> I have an ascii file containing only one line: >> >> $ echo "GOOG/NASDAQ_GOOG" > portfolio.txt >> >> $ cat portfolio.txt >> GOOG/NASDAQ_GOOG >> >> >> I just read the content of this file by using readdlm and try to use it >> to call the same function quandl, but it does not work. >> >> julia> myportfolio = readdlm("./portfolio.txt",'\n') >> 1x1 Array{Any,2}: >> "GOOG/NASDAQ_GOOG" >> >> julia> typeof(myportfolio[1]) >> SubString{ASCIIString} >> >> julia> mydat = quandl(myportfolio[1],rows=100,format="DataFrame") >> ERROR: MethodError: `quandlget` has no method matching >> quandlget(::SubString{ASCIIString}) >> >> >> I suppose the easiest way to solve this problem is to convert my >> SubString{ASCIIString} variable to ASCIIString. Am I right here? How can I >> do it? >> >> Does any of you have another suggestion? May be I could read my data in a >> different way instead of using readdlm? >> >> Thanks for any tip! >> >> best, >> >> Charles >> -- >> Um axé! :) >> >> -- >> Charles Novaes de Santana, PhD >> http://www.imedea.uib-csic.es/~charles >> > -- Um axé! :) -- Charles Novaes de Santana, PhD http://www.imedea.uib-csic.es/~charles
[julia-users] Re: Convert SubString{ASCIIString} to String
Maybe this will work for you? julia> a = "foobarbaz" "foobarbaz" julia> b = SubString(a,3,6) "obar" julia> typeof(b) SubString{ASCIIString} julia> c = ASCIIString(b) "obar" julia> typeof(c) ASCIIString On Friday, December 4, 2015 at 2:48:12 PM UTC-8, Charles Santana wrote: > > Hi people, > > Maybe it is a trivial question for most of you, but I really could not > find a way to solve my problem. > > I am using the function quandlget(id::ASCIIString) from the library > https://github.com/milktrader/Quandl.jl (a great contribution, by the > way!) > > Everything works fine when I use it in a straightforward way: > > julia> mydat = quandl("GOOG/NASDAQ_GOOG",rows=100,format="DataFrame") > 100x6 DataFrames.DataFrame > | Row | Date | Open | High | Low| Close | Volume| > |-||||||---| > | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | > | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | > | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | > > > or when I do: > > julia> myid = "GOOG/NASDAQ_GOOG" > "GOOG/NASDAQ_GOOG" > > julia> typeof(myid) > ASCIIString > > julia> mydat = quandl(myid,rows=100,format="DataFrame") > 100x6 DataFrames.DataFrame > | Row | Date | Open | High | Low| Close | Volume| > |-||||||---| > | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | > | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | > | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | > > > However, I get an error when I read my data from an external file. Assume > I have an ascii file containing only one line: > > $ echo "GOOG/NASDAQ_GOOG" > portfolio.txt > > $ cat portfolio.txt > GOOG/NASDAQ_GOOG > > > I just read the content of this file by using readdlm and try to use it to > call the same function quandl, but it does not work. > > julia> myportfolio = readdlm("./portfolio.txt",'\n') > 1x1 Array{Any,2}: > "GOOG/NASDAQ_GOOG" > > julia> typeof(myportfolio[1]) > SubString{ASCIIString} > > julia> mydat = quandl(myportfolio[1],rows=100,format="DataFrame") > ERROR: MethodError: `quandlget` has no method matching > quandlget(::SubString{ASCIIString}) > > > I suppose the easiest way to solve this problem is to convert my > SubString{ASCIIString} variable to ASCIIString. Am I right here? How can I > do it? > > Does any of you have another suggestion? May be I could read my data in a > different way instead of using readdlm? > > Thanks for any tip! > > best, > > Charles > -- > Um axé! :) > > -- > Charles Novaes de Santana, PhD > http://www.imedea.uib-csic.es/~charles >
[julia-users] what's the easiest way to force a recompilation?
I'd rather not alter any of the source files. Is there a Pkg command that will recompile? (Pkg.build() doesn't seem to do it).
[julia-users] Fwd: [ANN] Nemo 0.4 released!
Hi all, It is with great pleasure that we release Nemo-0.4. Nemo is a computer algebra package written in the Julia programming language, with the eventual aim of covering commutative algebra, number theory and group theory. For instructions on getting and using Nemo-0.4, including full documentation see: http://nemocas.org/downloads.html One of the things we've worked really hard on in this release is fleshing out the generic matrix algorithms over rings, including fast generic algorithms for: * LU factorisation * reduced row echelon form * determinant * rank * linear solving * upper triangular solving * matrix inverse * (vector space) nullspace * hessenberg form * characteristic polynomial * minimal polynomial Most of these algorithms now have specialisations for generic matrices over fields in addition to the more generic version for general commutative rings, with further specialisations in some cases for the integers or for rings where there is coefficient explosion, e.g. with modular, interpolation or fraction free algorithms. Numerous benchmarks have been added to our benchmarks page to show that these implementations are competitive with other systems. http://nemocas.org/benchmarks.html Some other improvements in Nemo-0.4 include: * Arb is now available on Windows 64 * OSX build is more reliable (>= 1 successful build report on OSX El Capitan) * better handling of rpaths on Linux * build Pari in single threaded mode (slight speedup) * wrap Flint's Howell form * update to MPIR-2.7.2 * upgrade to MPFR-3.1.3 * better catching of impossible inverses * random similarity transforms (for test code) * baby-steps giant-steps generic polynomial subst * Z["x"] polynomial ring syntax supported * R[a, b c] matrix syntax supported for Nemo types * conversion to and from Newton bases * wrap Flint permutations * rename Collection to Nemo.Set * added Nemo.Group abstract type * big speedups for polynomial resultant and Euclidean division * multinomial powering * update to Julia-0.4.1 (no changes required) * many small helper functions and bug fixes The main contributors to this release were: * William Hart * Tommy Hofmann * Claus Fieker * Fredrik Johansson. A number of others contributed to build testing. We've actually been working on Nemo-0.5 in parallel, so this should be released in January. If anyone is interested in learning Julia or contributing to Nemo, there's a list of interesting projects on our development page: http://nemocas.org/development.html We've focused here on projects that might be interesting for CS or Maths students to implement or which might make interesting open ended research projects, (as opposed to small bits and pieces of maintenance, which we've confined to our todo.txt). Suggestions of additional projects are also very welcome. Enjoy!! And please do let us know of successful/unsuccessful builds. Best Wishes, Bill Hart Tommy Hofmann Claus Fieker Fredrik Johansson
[julia-users] Convert SubString{ASCIIString} to String
Hi people, Maybe it is a trivial question for most of you, but I really could not find a way to solve my problem. I am using the function quandlget(id::ASCIIString) from the library https://github.com/milktrader/Quandl.jl (a great contribution, by the way!) Everything works fine when I use it in a straightforward way: julia> mydat = quandl("GOOG/NASDAQ_GOOG",rows=100,format="DataFrame") 100x6 DataFrames.DataFrame | Row | Date | Open | High | Low| Close | Volume| |-||||||---| | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | or when I do: julia> myid = "GOOG/NASDAQ_GOOG" "GOOG/NASDAQ_GOOG" julia> typeof(myid) ASCIIString julia> mydat = quandl(myid,rows=100,format="DataFrame") 100x6 DataFrames.DataFrame | Row | Date | Open | High | Low| Close | Volume| |-||||||---| | 1 | 2015-07-08 | 521.05 | 522.73 | 516.11 | 516.83 | 1.2967e6 | | 2 | 2015-07-09 | 523.12 | 523.77 | 520.35 | 520.68 | 1.84235e6 | | 3 | 2015-07-10 | 526.29 | 532.56 | 525.55 | 530.13 | 1.95668e6 | However, I get an error when I read my data from an external file. Assume I have an ascii file containing only one line: $ echo "GOOG/NASDAQ_GOOG" > portfolio.txt $ cat portfolio.txt GOOG/NASDAQ_GOOG I just read the content of this file by using readdlm and try to use it to call the same function quandl, but it does not work. julia> myportfolio = readdlm("./portfolio.txt",'\n') 1x1 Array{Any,2}: "GOOG/NASDAQ_GOOG" julia> typeof(myportfolio[1]) SubString{ASCIIString} julia> mydat = quandl(myportfolio[1],rows=100,format="DataFrame") ERROR: MethodError: `quandlget` has no method matching quandlget(::SubString{ASCIIString}) I suppose the easiest way to solve this problem is to convert my SubString{ASCIIString} variable to ASCIIString. Am I right here? How can I do it? Does any of you have another suggestion? May be I could read my data in a different way instead of using readdlm? Thanks for any tip! best, Charles -- Um axé! :) -- Charles Novaes de Santana, PhD http://www.imedea.uib-csic.es/~charles
[julia-users] Can somebody provide an advice as to how to fix this?
I posted the "internal server error: 500" on juliabox discussion group, but it did not work. There was one response asking me to fix the SSH key. Is it something to be fixed by the Juliabox team, or is it something to do with my browsers? I tried Safari (Mac), Google Chrome (Windows), and Internet Explorer (Windows). I get the same message everywhere. Yet a week ago, it worked perfectly! Would be good to have this feature back. Sorry for posting to a wrong discussion group, just hoping someone may have a good answer, as this is a highly responsive group, :-) Best, Arin
[julia-users] Re: binary string to hex
ahh i see thanks going a = a $(0x1 << 6) reverts back then again I could just initialise it again to default :) tks guys M
[julia-users] Re: binary string to hex
you're binary-or'ing a bit with 0x0, which means you're not going to change it. There's some useful information here: https://en.wikipedia.org/wiki/Bit_manipulation On Friday, December 4, 2015 at 9:47:45 AM UTC-8, Martin Somers wrote: > > > > On Friday, 4 December 2015 16:36:34 UTC, James Gilbert wrote: >> >> I find bits(a) more useful than bin(a). It enables me to see all the bits >> of an integer when experimenting with << and >> to see if I'm doing the >> right thing. eg, set the 2nd bit of a byte: >> >> >> *julia> **a = 0b0010* >> >> *0x02* >> >> >> *julia> **bits(a)* >> >> *"0010"* >> >> >> *julia> **a = a | (0x1 << 6)* >> >> *0x42* >> >> >> *julia> **bits(a)* >> >> *"0110"* >> >> > Looks interesting though when I try to set it back to the original, I get > 0x42 > > a = a | (0x0 << 6) > > I guess im missing something :) > M >
[julia-users] Re: binary string to hex
On Friday, 4 December 2015 16:36:34 UTC, James Gilbert wrote: > > I find bits(a) more useful than bin(a). It enables me to see all the bits > of an integer when experimenting with << and >> to see if I'm doing the > right thing. eg, set the 2nd bit of a byte: > > > *julia> **a = 0b0010* > > *0x02* > > > *julia> **bits(a)* > > *"0010"* > > > *julia> **a = a | (0x1 << 6)* > > *0x42* > > > *julia> **bits(a)* > > *"0110"* > > Looks interesting though when I try to set it back to the original, I get 0x42 a = a | (0x0 << 6) I guess im missing something :) M
[julia-users] Re: Hello World.jl
Ha ok, thank you much ;)
[julia-users] Re: binary string to hex
I find bits(a) more useful than bin(a). It enables me to see all the bits of an integer when experimenting with << and >> to see if I'm doing the right thing. eg, set the 2nd bit of a byte: *julia> **a = 0b0010* *0x02* *julia> **bits(a)* *"0010"* *julia> **a = a | (0x1 << 6)* *0x42* *julia> **bits(a)* *"0110"*
Re: [julia-users] binary string to hex
> > Yeh looking for some means of concatenaing binary bits together - was >> think of using a string but can find a method, function to do it > > sorry Mauro but your suggestion is just a transformation - I need a little more control on the binary bits cheers M
Re: [julia-users] binary string to hex
That works, but I'm concerned with the part of the original post that says " I want to change some of the bits and get a hex back" I'm hoping that the OP's plan to "change bits" is not realized by changing the string representation, but rather changing the bit representation (using << and >> and/or bitwise operators). S. On Friday, December 4, 2015 at 4:49:09 AM UTC-8, Mauro wrote: > > This works: > > julia> a = 0b1010 > 0xaf > > julia> parse("0b"*bin(a)) > 0xaf > > but maybe there are better ways. > > On Fri, 2015-12-04 at 13:33, Martin Somers > wrote: > > Just wondering binary to hex > > a = 0b1010 > > bin(a) > "1010" > > > > this results in a string that can be accessed with [] notation > > > > is there an easy way to go backwards I want to change some of the bits > and > > get a hex back > > > > M >
[julia-users] Re: Sorting Multidimensional Array With Respect To Two Columns (SOLVED)
4 Aralık 2015 Cuma 11:32:05 UTC+2 tarihinde user00 yazdı: > > I am sorry if this question is asked before, but I couldn't find any > relevant discussion. > > I have an array 400x3 Array{Any,2} . First two columns consist of numbers, > and third column consists of strings. I want to first sort this array with > respect to third column and then with respect to first column and then with > respect to second column. The final result should be like: > > 1 -1 "A" > 1 1"A" > 2 0"A" > 5 3"B" > 6 3"C" > > Thanks. > Edit: Matt's Solution is perfect for me. Thanks to everyone.
[julia-users] Re: Sorting Multidimensional Array With Respect To Two Columns
Tuples sort lexicographically, so you can just use a custom "by" transformation that puts the columns in the order you want: sortrows(A, by=x->(x[3],x[1],x[2])) On Friday, December 4, 2015 at 8:24:30 AM UTC-5, Ravi S wrote: > > Something like this? > > x = [ 2 0 "D" > 1 -1 "A" > 5 3 "B" > 1 1 "A" > 6 3 "C"] > > julia> x2=x[sortperm(x[:,2]),:] > 5x3 Array{Any,2}: > 1 -1 "A" > 2 0 "D" > 1 1 "A" > 5 3 "B" > 6 3 "C" > > julia> x1=x2[sortperm(x2[:,1]),:] > 5x3 Array{Any,2}: > 1 -1 "A" > 1 1 "A" > 2 0 "D" > 5 3 "B" > 6 3 "C" > > x3=x1[sortperm(x1[:,3]),:] > 5x3 Array{Any,2}: > 1 -1 "A" > 1 1 "A" > 5 3 "B" > 6 3 "C" > 2 0 "D" > > Regards, > Ravi > > On Friday, December 4, 2015 at 3:02:05 PM UTC+5:30, user00 wrote: >> >> I am sorry if this question is asked before, but I couldn't find any >> relevant discussion. >> >> I have an array 400x3 Array{Any,2} . First two columns consist of >> numbers, and third column consists of strings. I want to first sort this >> array with respect to third column and then with respect to first column >> and then with respect to second column. The final result should be like: >> >> 1 -1 "A" >> 1 1"A" >> 2 0"A" >> 5 3"B" >> 6 3"C" >> >> Thanks. >> >
[julia-users] Re: Sorting Multidimensional Array With Respect To Two Columns
Something like this? x = [ 2 0 "D" 1 -1 "A" 5 3 "B" 1 1 "A" 6 3 "C"] julia> x2=x[sortperm(x[:,2]),:] 5x3 Array{Any,2}: 1 -1 "A" 2 0 "D" 1 1 "A" 5 3 "B" 6 3 "C" julia> x1=x2[sortperm(x2[:,1]),:] 5x3 Array{Any,2}: 1 -1 "A" 1 1 "A" 2 0 "D" 5 3 "B" 6 3 "C" x3=x1[sortperm(x1[:,3]),:] 5x3 Array{Any,2}: 1 -1 "A" 1 1 "A" 5 3 "B" 6 3 "C" 2 0 "D" Regards, Ravi On Friday, December 4, 2015 at 3:02:05 PM UTC+5:30, user00 wrote: > > I am sorry if this question is asked before, but I couldn't find any > relevant discussion. > > I have an array 400x3 Array{Any,2} . First two columns consist of numbers, > and third column consists of strings. I want to first sort this array with > respect to third column and then with respect to first column and then with > respect to second column. The final result should be like: > > 1 -1 "A" > 1 1"A" > 2 0"A" > 5 3"B" > 6 3"C" > > Thanks. >
[julia-users] Re: Hello World.jl
You can store your data wherever you want. In particular for the package you noted (ExcelReaders) you can do things like: using ExcelReaders f = openxl("/path/to/my/file/Filename.xlsx")
[julia-users] Re: Hello World.jl
Or from your terminal command line you can type julia path/to/hello.jl and it will execute was is in the file. This is the first topic that is discussed in the manual which you should look over): http://docs.julialang.org/en/release-0.4/manual/getting-started/ On Thursday, December 3, 2015 at 3:43:12 PM UTC-6, Mark Kugel wrote: > > > > Hi, I'm just starting to work with JULIA, and I have a couple of questions > : > > 1) To get in touch with Julia, I have a small "hello.jl" script with only > "*println("Hello > World.")*". How do I run it through Julia ? Is there somewhere in my mac > a misty folder that Julia read and where I should store all my scripts ? > 2) I want to use some data stored in a excel file. In my program, I use > "ExcelReaders". Where do I have to store my Excel file to let Julia read it > ? > > > Some info : *Julia Version 0.4.1, installed on my Mac Book Pro in > '/Applications/Julia-0.4.1.app'* > > > Thank you > > > MK >
Re: [julia-users] binary string to hex
This works: julia> a = 0b1010 0xaf julia> parse("0b"*bin(a)) 0xaf but maybe there are better ways. On Fri, 2015-12-04 at 13:33, Martin Somers wrote: > Just wondering binary to hex > a = 0b1010 > bin(a) > "1010" > > this results in a string that can be accessed with [] notation > > is there an easy way to go backwards I want to change some of the bits and > get a hex back > > M
[julia-users] binary string to hex
Just wondering binary to hex a = 0b1010 bin(a) > "1010" this results in a string that can be accessed with [] notation is there an easy way to go backwards I want to change some of the bits and get a hex back M
[julia-users] Sorting Multidimensional Array With Respect To Two Columns
I am sorry if this question is asked before, but I couldn't find any relevant discussion. I have an array 400x3 Array{Any,2} . First two columns consist of numbers, and third column consists of strings. I want to first sort this array with respect to third column and then with respect to first column and then with respect to second column. The final result should be like: 1 -1 "A" 1 1"A" 2 0"A" 5 3"B" 6 3"C" Thanks.