[julia-users] Re: How to switfh off combine functrion in sparse?

2016-11-25 Thread programistawpf
Why "/" not work ? julia> I 4-element Array{Int64,1}: 1 1 2 3 julia> J 4-element Array{Int64,1}: 1 1 2 3 julia> V 4-element Array{Int64,1}: 2 5 1 1 julia> sparse(I,J,V,3,3,*) 3x3 sparse matrix with 3 Int64 entries: [1, 1] = 10 [2, 2] = 1 [3, 3] = 1 julia

[julia-users] Re: How to switfh off combine functrion in sparse?

2016-11-25 Thread programistawpf
Why "/" and "div" not work ? julia> I 4-element Array{Int64,1}: 1 1 2 3 julia> J 4-element Array{Int64,1}: 1 1 2 3 julia> V 4-element Array{Int64,1}: 2 5 1 1 julia> sparse(I,J,V,3,3,*) 3x3 sparse matrix with 3 Int64 entries: [1, 1] = 10 [2, 2] = 1 [3, 3] =

[julia-users] How to vonvet Char to Float64, what wrong ?

2016-11-25 Thread programistawpf
How to convert Char to Float? What wrong ? julia> eltype(sort(unique(dane[:,4]))[3]) Char julia> (sort(unique(dane[:,4]))[3]) "-.097" julia> convert(Float64(sort(unique(dane[:,4]))[3])) ERROR: MethodError: `convert` has no method matching convert(::Type{Float64}, ::UTF8String) This may have ar

Re: [julia-users] Re: Dict() how to creat in 5.0 ?

2016-10-30 Thread programistawpf
Yes, thx. P. W dniu 2016-10-30 14:14, Cedric St-Jean pisze: Dict(zip(slow[:,1], slow[:,2])) ? On Sunday, October 30, 2016 at 8:34:29 AM UTC-4, program...@gmail.com wrote: Dict() how to creat in 5.0 ? julia> typeof(slow) Array{Any,2} julia> D=Dict(slow[:,1],slow[:,2]) ERR

[julia-users] Dict() how to creat in 5.0 ?

2016-10-30 Thread programistawpf
Dict() how to creat in 5.0 ? julia> typeof(slow) Array{Any,2} julia> D=Dict(slow[:,1],slow[:,2]) ERROR: MethodError: no method matching Dict{K,V}(::Array{Any,1}, ::Array{Any,1}) Closest candidates are: Dict{K,V}(::Any) at dict.jl:383 Dict{K,V}{T}(::Any) at sysimg.jl:53 It is working code fr

Re: [julia-users] 0.5 how to convert to Int

2016-10-27 Thread programistawpf
BIG THX, but what about Float array ? julia> Int.(rand(Bool,10)) 10-element Array{Int64,1}: 1 0 1 1 1 0 1 0 0 0 julia> Int.(rand(10)) ERROR: InexactError() in macro expansion at .\broadcast.jl:129 [inlined] in macro expansion at .\simdloop.jl:73 [inlined] in macro expansion at .\broad

[julia-users] 0.5 how to convert to Int

2016-10-27 Thread programistawpf
in ver 0.5 how to convert to Int f.e bool or Float julia> int(rand(Bool,10)) ERROR: UndefVarError: int not defined julia> convert(Int64,rand(Bool,10)) ERROR: MethodError: Cannot `convert` an object of type Array{Bool,1} to an object of type Int64 This may have arisen from a call to the construct

Re: [julia-users] Re: prblem with space after "ś", "ć" ERROR: UnicodeError: invalid character index

2016-10-20 Thread programistawpf
Between n comma and last comma Paul W dniu 2016-10-20 21:45, Kristoffer Carlsson pisze: What do you actually want to do? Extract all characters after a comma? On Thursday, October 20, 2016 at 9:26:01 PM UTC+2, programistawpf wrote: Ok, I finded: findin(temp,[","])... f

Re: [julia-users] Re: prblem with space after "ś", "ć" ERROR: UnicodeError: invalid character index

2016-10-20 Thread programistawpf
Ok, I finded: findin(temp,[","])... for i=1:nol temp=(collect(graphemes(readline(o poz=(findin(temp,[","])[end])+1 write(io, temp[poz]) write(io, "\n") if mod(i,10^6)==0 println(i) end end But is very slow :/ someting faster ? I have 10^ 8 line of tekst :/ Paul W dniu 2016-10-20 20:28, pr

[julia-users] Re: prblem with space after "ś", "ć" ERROR: UnicodeError: invalid character index

2016-10-20 Thread programistawpf
Thx, i slower but works:) and next question : ho to find Char in collection ? julia> str="abc" "abc" julia> findin(str,"c") 1-element Array{Int64,1}: 3 julia> julia> temp=collect(graphemes(str)) 3-element Array{SubString{String},1}: "a" "b" "c" julia> findin(temp,"c") 0-element Array{Int64

[julia-users] Re: prblem with space after "ś", "ć" ERROR: UnicodeError: invalid character index

2016-10-20 Thread programistawpf
Big Thx but how to work with this data ? Paul W dniu czwartek, 20 października 2016 19:43:47 UTC+2 użytkownik Kristoffer Carlsson napisał: > > Specifically, > > >- Conceptually, a string is a *partial function* from indices to >characters: for some index values, no character value is

[julia-users] Re: prblem with space after "ś", "ć" ERROR: UnicodeError: invalid character index

2016-10-20 Thread programistawpf
W dniu czwartek, 20 października 2016 19:35:41 UTC+2 użytkownik program...@gmail.com napisał: > > Julia ver Version 0.5.0 (2016-09-19 18:14 UTC) 64 bits > File is UTF8 without BOM > >sa sdś aa,1

[julia-users] Re: prblem with space after "ś", "ć" ERROR: UnicodeError: invalid character index

2016-10-20 Thread programistawpf
Julia ver Version 0.5.0 (2016-09-19 18:14 UTC) 64 bits File is UTF8 without BOM

[julia-users] prblem with space after "ś", "ć" ERROR: UnicodeError: invalid character index

2016-10-20 Thread programistawpf
What wrong ? julia> o=open("string.txt","w") IOStream() julia> write(o,b) 12 julia> close(o) julia> o=open("string.txt") IOStream() julia> temp=readline() "\r\n" julia> temp=readline(o) "sa sdś aa,1" julia> julia> temp[6] 'ś' julia> temp[7] ERROR: UnicodeError: invalid character index i

Re: [julia-users] UTF8, how to procesed text data

2016-10-20 Thread programistawpf
Julia ver 5 is OK , but is new problem with space after ś, ć . More in new post... Paul W dniu środa, 19 października 2016 15:04:13 UTC+2 użytkownik Milan Bouchet-Valat napisał: > > Le mercredi 19 octobre 2016 à 06:02 -0700, program...@gmail.com > a > écrit : > > Version 0.3.12, udate to 5

Re: [julia-users] Re: UTF8, how to procesed text data

2016-10-20 Thread programistawpf
I need list of "," [3,6,8] ... but not only first .. "3" Paul W dniu 2016-10-19 16:03, Krisztián Pintér pisze: On Wednesday, October 19, 2016 at 1:46:38 PM UTC+2, program...@gmail.com wrote: julia> temp[61:65] "aźdz" julia> findin(temp[61:65],"d") ERROR: invalid UTF-8 chara

Re: [julia-users] UTF8, how to procesed text data

2016-10-19 Thread programistawpf
Version 0.3.12, udate to 5 ? W dniu środa, 19 października 2016 14:56:15 UTC+2 użytkownik Milan Bouchet-Valat napisał: > > Le mercredi 19 octobre 2016 à 04:46 -0700, program...@gmail.com > a > écrit : > > Data file is coding UTF8 but i cant procedsed this datain Julia ? > > What wrong ? > >

[julia-users] UTF8, how to procesed text data

2016-10-19 Thread programistawpf
Data file is coding UTF8 but i cant procedsed this datain Julia ? What wrong ? o=open("data.txt") julia> temp=readline(io) "3699778,13,2,gdbiehz jablej gupując szybgi Injehnej dg 26 paździehniga,1\n" julia> temp[61:65] "aźdz" julia> findin(temp[61:65],"d") ERROR: invalid UTF-8 character index

Re: [julia-users] How to write data to new line in outfile.txt

2016-10-13 Thread programistawpf
THX, :) W dniu czwartek, 13 października 2016 14:13:14 UTC+2 użytkownik Michele Zaffalon napisał: > > What about a newline with write(f, "\n") before writing the next block of > data into the file? > > On Thu, Oct 13, 2016 at 1:08 PM, > > wrote: > >> How to write data to new line in outfile.txt

[julia-users] How to write data to new line in outfile.txt

2016-10-13 Thread programistawpf
How to write data to new line in outfile.txt file, in this script data i still writing in the same line io=open("outfile.txt", "w" o=open("dump.txt") for i=1:100 temp=readline(o) poz=findin(temp,",")[3] write(io, temp[1:poz-1]) end close(o) close(io) Paul

[julia-users] HDF5, how to save string data to file?

2016-10-13 Thread programistawpf
how to save string data to file? What wrong ? julia> dset = d_create(g, "/dane", datatype(String), dataspace(nol)) ERROR: `datatype` has no method matching datatype(::Type{String}) julia> dset = d_create(g, "/dane", datatype(UTF8String), dataspace(nol)) ERROR: `datatype` has no method matching da

[julia-users] Re: How to switfh off combine functrion in sparse?

2016-08-12 Thread programistawpf
ThX, Paul W dniu piątek, 12 sierpnia 2016 18:28:26 UTC+2 użytkownik Kristoffer Carlsson napisał: > > try sparse(I,J,V,m,n,(a,b) ->a) > > On Friday, August 12, 2016 at 5:06:29 PM UTC+2, program...@gmail.com > wrote: >> >> How to switfh off combine functrion in sparse? I need to ingore new >> va

[julia-users] How to switfh off combine functrion in sparse?

2016-08-12 Thread programistawpf
How to switfh off combine functrion in sparse? I need to ingore new value if in data is duplicat row/col. Somthing like this : sparse(I,J,V,m,n,+=0) but this dont work. Paul

Re: [julia-users] how to get all combination of rows in array

2016-06-23 Thread programistawpf
BigTHX, W dniu czwartek, 23 czerwca 2016 12:04:40 UTC+2 użytkownik Tamas Papp napisał: > > vcat(unique([A[i,:] for i in 1:size(A,1)])...) > > On Thu, Jun 23 2016, programistawpf wrote: > > > Thx, like below: > > How to crate one matix of result? > > >

Re: [julia-users] how to get all combination of rows in array

2016-06-23 Thread programistawpf
sub, convert to vectors, etc, depending > on what you need it for. > > On Thu, Jun 23 2016, programistawpf wrote: > > > how to get all combination of rows in array ? > > > > 10x3 Array{Int64,2}: > > 0 4 4 > > 4 2 0 > > 1 4 3 >

[julia-users] how to get all combination of rows in array

2016-06-23 Thread programistawpf
how to get all combination of rows in array ? 10x3 Array{Int64,2}: 0 4 4 4 2 0 1 4 3 2 5 1 2 2 2 2 2 3 3 0 1 4 1 4 4 4 1 1 3 4 i.e... 001 014 020 ect Paul

[julia-users] How to convert pgm graphics file to array 0-255

2016-06-09 Thread programistawpf
How to convert pgm graphics file to array 0-255 ? Paul

Re: [julia-users] how use find ?

2014-07-12 Thread programistawpf
Big thx. In documentation is : find(f, A) Return a vector of the linear indexes of A where f returns true. (function, OBJECT) What You think, s it error in documention ? Paul W dniu sobota, 12 lipca 2014 17:52:05 UTC+2 użytkownik Cameron McBride napisał: > > julia> find( a .> 5 ) > > cheers,

Re: [julia-users] Sort error, How to find reserved word in big text ?

2014-07-12 Thread programistawpf
Not, i found this: it was row with "inf" inerwacjom *Inf* infam infama how to defend against such cases? I have a dynamic dictionaries from the network. Paul W dniu sobota, 12 lipca 2014 18:14:39 UTC+2 użytkownik Stefan Karpinski napisał: > > The problem here seems to be that you're comparin