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

2016-11-25 Thread Milan Bouchet-Valat
Le vendredi 25 novembre 2016 à 00:35 -0800, programista...@gmail.com a écrit : > How to convert Char  to Float? What wrong ? Use parse(Float64, string(x)), with x the Char. Regards > julia> eltype(sort(unique(dane[:,4]))[3]) > Char > > julia> (sort(unique(dane[:,4]))[3]) > "-.097" > > julia>

Re: [julia-users] Good way to organize constants?

2016-11-16 Thread Milan Bouchet-Valat
Le mercredi 16 novembre 2016 à 13:38 +, FANG Colin a écrit : > Is there going to be overhead if I create constant group modules and > use them via module_name.abc? Not that I know of. Regards > On 16 November 2016 at 13:31, Milan Bouchet-Valat <nalimi...@club.fr> > wrote:

Re: [julia-users] Good way to organize constants?

2016-11-16 Thread Milan Bouchet-Valat
Le mercredi 16 novembre 2016 à 04:18 -0800, FANG Colin a écrit : > Say, I have a few constants > > const VTYPE_BINARY = 'B' > const VTYPE_INTEGER = 'I' > const VTYPE_CONTINUOUS = 'C' > > What's a good way to have a namespace on it? > > So that I can use Vtype.BINARY, Vtype.INTEGER, 

Re: [julia-users] Sharing experience on packages

2016-11-16 Thread Milan Bouchet-Valat
Le mardi 15 novembre 2016 à 02:02 -0800, Jérôme Collet a écrit : > Hi all, > > I am new to Julia, I used to use R. And using R packages, the main > difficulty for me is the choice of a package for a given task. Most > of the time, there are many packages solving the same problem, so we > have to

Re: [julia-users] R's update(Update and Re-fit a Model) in Julia?

2016-11-15 Thread Milan Bouchet-Valat
Le lundi 14 novembre 2016 à 14:18 -0800, Hongwei Liu a écrit : > Hi guys, > > I am new to Julia and I have trouble in finding a similar function in > Julia that has the ability of "update" in R. > > For example, set formula = y ~ x1 + x2 > > In R, I can use update(formula, D  ~ . ) to change

Re: [julia-users] Iterating over non-zero entries of a sparse matrix

2016-11-09 Thread Milan Bouchet-Valat
Le mercredi 09 novembre 2016 à 05:37 -0800, Christoph Ortner a écrit : > Is there as iterator implemented that allows me to iterate over all > non-zero entries of a sparse matrix or vector? E.g.  > > for (i, j, z) in nonzeros(A)  > > > (I realise that nonzeros does something else!) As the docs

Re: [julia-users] Re: Immutable type modification of SparseMatrixCSC

2016-11-07 Thread Milan Bouchet-Valat
Le dimanche 06 novembre 2016 à 15:31 -0800, Kristoffer Carlsson a écrit : > > > > For reference, here's the long discussion that happened before making  > > that change:  > > https://github.com/JuliaLang/julia/pull/16371  > > > > Indeed I think Tony was right that this has undesirable

Re: [julia-users] Re: converting binary string into integer

2016-11-06 Thread Milan Bouchet-Valat
Le dimanche 06 novembre 2016 à 10:13 -0800, Alberto Barradas a écrit : > Hi guys, > Now that `parseint()` got removed for version 0.5, Is `parse()` the > only way to do this? >  How could I parse binary into a BigInt? More specifically, I want to > see the integer number of the arecibo message.

Re: [julia-users] Re: [Announcement] Moving to Discourse (Statement of Intent)

2016-11-06 Thread Milan Bouchet-Valat
Le dimanche 06 novembre 2016 à 01:49 -0800, Andreas Lobinger a écrit : > Hello colleague, > > > The Julia community has been growing rapidly over the last few > > years and discussions are happening at many different places: there > > are several Google Groups (julia-users, julia-dev, ...), IRC,

Re: [julia-users] Re: Immutable type modification of SparseMatrixCSC

2016-11-06 Thread Milan Bouchet-Valat
For reference, here's the long discussion that happened before making that change: https://github.com/JuliaLang/julia/pull/16371 Indeed I think Tony was right that this has undesirable consequences in terms of usability. Not being able to use the same in-place API for dense and sparse matrices is

Re: [julia-users] Question: Forcing readtable to create string type on import

2016-11-03 Thread Milan Bouchet-Valat
Le jeudi 03 novembre 2016 à 13:35 -0700, LeAnthony Mathews a écrit : > Thanks Michael, >   I been thinking about this all day.  Yes, basically I am going to > have to create a macro CSVreadtable that mimics the readtable > command, but in the expantion uses CSV.read.  The macro will manually >

Re: [julia-users] package reproducibility

2016-10-31 Thread Milan Bouchet-Valat
Le vendredi 28 octobre 2016 à 00:24 -0700, Kevin Kunzmann a écrit : > Hey, > > I was just wondering whether Julia has a checkpoint-like > functionality (R checkpoint-package) for using a specific checkpoint > of the package ecosystem. With quick development happening this would > improve

Re: [julia-users] parse Unicode string to Float64

2016-10-25 Thread Milan Bouchet-Valat
Le lundi 24 octobre 2016 à 21:44 -0700, Chris Stook a écrit : > I'm trying to parse a text file which contains some floating point > numbers.  The number 2.5 is represented by the string > "\x002\0.\x005\0".  Parse will not convert this to a Float64.  Print > works (prints "2.5") in Atom and

Re: [julia-users] Named for loops?

2016-10-24 Thread Milan Bouchet-Valat
Le lundi 24 octobre 2016 à 08:05 -0400, Isaiah Norton a écrit : > > > On Monday, October 24, 2016, Angel de Vicente gmail.com> wrote: > > Hi, > > > > I don't see it in the documentation, but I'm wondering if there is > > a way > > to have named nested loops, so that

Re: [julia-users] Selecting rows from a DataFrame using a filter or predicate

2016-10-20 Thread Milan Bouchet-Valat
Le mercredi 19 octobre 2016 à 13:51 -0700, Dean Schulze a écrit : > I have a DataFrame > > julia> df > 252931×2 DataFrames.DataFrame > │ Row    │ x    │ y       │ > ├┼──┼─┤ > │ 1      │ 0    │ 3   │ > │ 2      │ 0    │ 6   │ > │ 3      │ 0    │ 124800  │ > │ 4      │ 0

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

2016-10-19 Thread Milan Bouchet-Valat
Le mercredi 19 octobre 2016 à 06:02 -0700, programista...@gmail.com a écrit : > Version 0.3.12, udate to 5 ? Yes. 0.3.x versions are unsupported for some time now. Regards > > Le mercredi 19 octobre 2016 à 04:46 -0700, program...@gmail.com a  > > écrit :  > > > Data file is coding UTF8 but i

Re: [julia-users] matrix multiplications

2016-10-19 Thread Milan Bouchet-Valat
Le mardi 18 octobre 2016 à 15:28 -0700, Steven G. Johnson a écrit : > > > > Since it uses the in-place assignment operator .= it could be made > > to work as desired, but there's some designing to do. > > > > The problem is that it doesn't know that * is a matrix multiplication > until

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

2016-10-19 Thread Milan Bouchet-Valat
Le mercredi 19 octobre 2016 à 04:46 -0700, programista...@gmail.com a écrit : > 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" >

Re: [julia-users] Dataframe without column and row names ?

2016-10-17 Thread Milan Bouchet-Valat
ow to make a nice border in a matrix ? DataFrames' main feature isn't to provide nice borders... You can try overriding the show() method for Matrix if you want borders. Regards > Regards > > Henri > > > Le 15/10/2016 à 22:32, Milan Bouchet-Valat a écrit : > > >

Re: [julia-users] How to determine which functions to overload, or, who is at the bottom of the function chain?

2016-10-16 Thread Milan Bouchet-Valat
Le samedi 15 octobre 2016 à 20:36 -0700, colintbow...@gmail.com a écrit : > Hi all, > > Twice now I've thought I had overloaded the appropriate functions for > a new type, only to observe apparent inconsistencies in the way the > new type behaves. Of course, there were no inconsistencies.

Re: [julia-users] Dataframe without column and row names ?

2016-10-16 Thread Milan Bouchet-Valat
Le vendredi 14 octobre 2016 à 19:59 -0700, Henri Girard a écrit : > Hi, > Is it possible to have a table with only the result ? > I don't want row /column names. So why do you create a data frame? Isn't a Matrix enough? Regards > using DataFrames > function iain_magic(n::Int) >     M =

Re: [julia-users] why do we have Base.isless(a, ::NAtype) but not Base.isless(a, ::Nullable)?

2016-10-14 Thread Milan Bouchet-Valat
Le jeudi 13 octobre 2016 à 15:40 +0200, Florian Oswald a écrit : > i'm trying to understand why we don't have something similar in terms > of comparison for Nullable as we have for DataArrays NAtype (below). > point me to the relevant github conversation, if any, is fine.  Such a method already

Re: [julia-users] Re: What's the status of SIMD instructions from a user's perspective in v0.5?

2016-10-14 Thread Milan Bouchet-Valat
Le jeudi 13 octobre 2016 à 07:27 -0700, Florian Oswald a écrit : > > Hi Erik, > > that's great thanks. I may have a hot inner loop where this could be > very helpful. I'll have a closer look and come back with any > questions later on if that's ok.  Maybe I'm stating the obvious, but you don't

Re: [julia-users] Re: why do we have Base.isless(a, ::NAtype) but not Base.isless(a, ::Nullable)?

2016-10-14 Thread Milan Bouchet-Valat
Le jeudi 13 octobre 2016 à 06:45 -0700, Florian Oswald a écrit : > I mean, do I have to cycle through the array and basically clean it > of #NULL before findign the maximium or is there another way? Currently you have two solutions: julia> using NullableArrays julia> x = NullableArray([1, 2, 3,

Re: [julia-users] Re: translating julia

2016-10-10 Thread Milan Bouchet-Valat
we don't have to go through a too messy period with broken translations everywhere. Regards > > Think synergy! > > Regards, > Ismael Venegas Castelló > > > 2016-10-08 8:46 GMT-05:00 Milan Bouchet-Valat <>: > > > > Hi! > > > > I re

Re: [julia-users] Linux distributions with Julia >= 0.5.0

2016-10-08 Thread Milan Bouchet-Valat
Le samedi 08 octobre 2016 à 03:23 -0700, Femto Trader a écrit : > Hello, > > my main development environment is under Mac OS X > but I'm looking for a Linux distribution (that I will run under > VirtualBox) > that have Julia 0.5.0 support (out of the box) > > Even Debian Sid is 0.4.7 (October

Re: [julia-users] Re: Julia and the Tower of Babel

2016-10-08 Thread Milan Bouchet-Valat
Le samedi 08 octobre 2016 à 01:47 -0700, jonathan.bie...@alumni.epfl.ch a écrit : > Maybe an "easy" first step would be to have a page (a github repo) > containing domain specific naming conventions (atol/abstol) that > package > developers can look up. Even though existing packages might not

Re: [julia-users] Subset a DataFrame without a #NULL value in a column

2016-10-04 Thread Milan Bouchet-Valat
Le lundi 03 octobre 2016 à 18:14 -0700, Min-Woong Sohn a écrit : > Previously, under DataArray, I could do > > df2 = df[!isna(df[:somvar),:] > > Is there a NullableArray equivalent to isna()? I've tried isnull(), > which is not defined. isnull() is defined in Julia Base. But it's not a

Re: [julia-users] Is there a way to use values in a DataFrame directly in computation?

2016-10-03 Thread Milan Bouchet-Valat
Le lundi 03 octobre 2016 à 08:21 -0700, Min-Woong Sohn a écrit : > I am using DataFrames from master branch (with NullableArrays as the default) > and was wondering how the following should be done: > > df = DataFrame() > df[:A] = NullableArray([1,2,3]) > > The following are not allowed or

Re: [julia-users] Is there a way to use values in a DataFrame directly in computation?

2016-10-03 Thread Milan Bouchet-Valat
Le lundi 03 octobre 2016 à 08:21 -0700, Min-Woong Sohn a écrit : > > I am using DataFrames from master branch (with NullableArrays as the > default) and was wondering how the following should be done: > > df = DataFrame() > df[:A] = NullableArray([1,2,3]) > > The following are not allowed or

Re: [julia-users] Re: "both DataArrays and StatsBase export "rle"; uses of it in module DataFrames must be qualified"

2016-09-28 Thread Milan Bouchet-Valat
Le mercredi 28 septembre 2016 à 04:44 -0700, K leo a écrit : > Thanks for the reply.  Then this is an issue in DataFrames. Yes, but one that is already fixed in master by removing the dependency on DataArrays. Regards > > As the error says, they both export a function called rle, so it is > >

Re: [julia-users] Re: LightXML Ubuntu 16.04 julia 0.4.5

2016-09-25 Thread Milan Bouchet-Valat
Le samedi 24 septembre 2016 à 06:17 -0700, Ján Adamčák a écrit : > Thanks, > > after installing  > > sudo apt-get install libxml2-dev > > is LightXML fully working. Could you file an issue against LightXML.jl? It should be able to install the package automatically, or could even work without

Re: [julia-users] Generators vs Comprehensions, Type-stability?

2016-09-23 Thread Milan Bouchet-Valat
Le jeudi 22 septembre 2016 à 14:54 -0700, Tsur Herman a écrit : > By the way my test3 functions is super fast > >  @time test3(r) >   0.32 seconds (4 allocations: 160 bytes) Beware, if you don't return 'total' from the function, LLVM optimizes away the whole loops and turns the function into

Re: [julia-users] Re: Is FMA/Muladd Working Here?

2016-09-21 Thread Milan Bouchet-Valat
Le mercredi 21 septembre 2016 à 12:15 -0700, Chris Rackauckas a écrit : > I see. So what I am getting is that, in my codes,  > > 1. I will need to add @fastmath anywhere I want these optimizations > to show up. That should be easy since I can just add it at the > beginnings of loops where I have

Re: [julia-users] Re: Is FMA/Muladd Working Here?

2016-09-21 Thread Milan Bouchet-Valat
Le mercredi 21 septembre 2016 à 11:36 -0700, Chris Rackauckas a écrit : > The Windows one is using the pre-built binary. The Linux one uses the > COPR nightly (I assume that should build with all the goodies?) The Copr RPMs are subject to the same constraint as official binaries: we need them to

Re: [julia-users] Configuring incomplete (julia-deps error 2)

2016-09-11 Thread Milan Bouchet-Valat
Le dimanche 11 septembre 2016 à 11:05 -0700, Davide a écrit : > Hi, > > I am trying to compile v0.5rc04 and I get the error reported below > during configuration. > My system: Debian GNU/Linux 64bit on an Intel i7 machine. > I checked for the required external dependencies and all are >

Re: [julia-users] correct typing for unsafe_wrap

2016-08-21 Thread Milan Bouchet-Valat
Le dimanche 21 août 2016 à 01:36 -0700, Andreas Lobinger a écrit : > Hello colleagues, > > i'm trying to use unsafe_wrap from a pointer from an external call > (cfunction) to an array access. > Looks like i have type problems: > > > > function read_from_stream_callback(s::IO, buf::Ptr{UInt8},

Re: [julia-users] How to install julia-0.5.0-rc0 on Ubuntu Linux

2016-07-28 Thread Milan Bouchet-Valat
Le jeudi 28 juillet 2016 à 01:58 -0700, Uwe Fechner a écrit : > Hello, > > I am trying to install julia-0.5.0-rc0 . > > I downloaded it from Github, unpacked it and executed > make -j4 > > The building failed after 10 minutes with the following > message: > > >  cblas_zhpr2  PASSED THE

Re: [julia-users] splice! inconsistency with Vector{Vector{UInt8}}

2016-07-25 Thread Milan Bouchet-Valat
Le samedi 23 juillet 2016 à 11:37 -0700, 'George Marrows' via julia- users a écrit : > Hi. As per the docs on splice! and n:(n-1) ranges, the following > works fine to insert a value before location 1 in a Vector: > x = [1,2,3] > splice!(x, 1:0, 23) > print(x)  # => [23,1,2,3] This example works,

Re: [julia-users] Additional dataframes library

2016-07-10 Thread Milan Bouchet-Valat
Le dimanche 10 juillet 2016 à 09:02 -0700, Brandon Taylor a écrit : > I'm looking to add an additional dataframes library. I was going to > pick up all the additional functions that are in tidyr and dplyr that > aren't covered in dataframes.jl and dataframesmeta.jl but I wanted to > check whether

Re: [julia-users] Error using inner constructors and type parameters

2016-07-09 Thread Milan Bouchet-Valat
Le vendredi 08 juillet 2016 à 18:20 -0700, James Noeckel a écrit : > type LinkedMesh{RT<:Real} >   faces::LinkedList{LinkedFace} >   vertices::Array{Point{3, RT}, 1} >   LinkedMesh(points::Array{Point{3, RT}, 1}) = new(nil(LinkedFace), > points) > end > > > When I pass the below value to the

Re: [julia-users] Re: A naive benchmark

2016-07-02 Thread Milan Bouchet-Valat
Le vendredi 01 juillet 2016 à 16:11 -0700, baillot maxime a écrit : > @Tim Holy : Thank you for the web page. I didn't know it. Now I > understand a lot of thing :) > > @Kristoffer and Patrick: I just read about that in the link that Tim > gave me. I did change the code and the time just past

Re: [julia-users] Julia 0.4.6 doesn't work in Windows x86 environment

2016-06-30 Thread Milan Bouchet-Valat
Le jeudi 30 juin 2016 à 02:24 -0700, Stefan Schnell a écrit : > > > Hello community, > > I installed the new Julia release 0.4.6 on a Windows x86 environment > but it doesn't work. I get the following message: > Activation context generation failed for "C:\Dummy\Julia- > 0.4.6\bin\julia.exe".

Re: [julia-users] Re: How to install 0.4.5 on Ubuntu?

2016-06-16 Thread Milan Bouchet-Valat
Le jeudi 16 juin 2016 à 01:34 -0700, Nils Gudat a écrit : > Apologies for decreasing quality of questions, but how do I actually > start julia after building from source on Linux? After having > successfully (I believe) built the latest 0.4.6-pre master, I can't > find an exectuable to start

Re: [julia-users] Re: parse.(Int64, x)

2016-06-16 Thread Milan Bouchet-Valat
Le mercredi 15 juin 2016 à 17:28 -0700, Tony Kelman a écrit : > Try parse.([Int64], x) > note that the output will be an Array{Any} because issue #4883 hasn't > been fixed yet. The issue here is that broadcast doesn't treat types > as "scalar-like." Is the latter a separate bug? Should we open an

Re: [julia-users] Re: function! vs. function

2016-06-12 Thread Milan Bouchet-Valat
Le dimanche 12 juin 2016 à 10:13 -0700, digxx a écrit : > the function I defined above? Or what do you mean? > function f!(a,farr) > for i=1:n > for j=1:n > farr[j,i] = (a[j,:]*a[:,i] - A[j,:]*a[:,i])[1] - k2[j,i] > end > end > end That method requires two

Re: [julia-users] I can enter the same keyword argument twice, and the second over-rules the first.

2016-06-12 Thread Milan Bouchet-Valat
Le samedi 11 juin 2016 à 19:46 -0700, colintbow...@gmail.com a écrit : > I can enter the same keyword argument twice, and the second entry is > the one that gets used. A short example follows: > > f(x::Int ; kw::Int=0) = x * kw > f(2) > f(2, kw=3) #evaluates to 6 > f(2, kw=3, kw=4) #evaluates to

Re: [julia-users] Constructors for types with Nullable fields

2016-06-10 Thread Milan Bouchet-Valat
Le vendredi 10 juin 2016 à 00:56 -0700, Helge Eichhorn a écrit : > Hi, > > let's say I have the following type with two Nullable fields: > > type WithNulls  >     a::Nullable{Float64}  >     b::Nullable{Float64} > end > > I now want the user to be able to create an instance of this type >

Re: ***SPAM*** [julia-users] Constructors for types with Nullable fields

2016-06-10 Thread Milan Bouchet-Valat
Le vendredi 10 juin 2016 à 00:56 -0700, Helge Eichhorn a écrit : > Hi, > > let's say I have the following type with two Nullable fields: > > type WithNulls  >     a::Nullable{Float64}  >     b::Nullable{Float64} > end > > I now want the user to be able to create an instance of this type >

Re: [julia-users] Re: Reconstruct a string from a Clang.jl generated looong type

2016-06-06 Thread Milan Bouchet-Valat
Le lundi 06 juin 2016 à 09:56 -0700, J Luis a écrit : > > > What exactly are you after?  > > >  What I'm after is simple. To be able to access the members > ``x_units`` and so on of > > http://gmt.soest.hawaii.edu/doc/latest/GMT_API.html#gmt-grids > > with the wrapper  > >

Re: [julia-users] good practice with dictionary pop!?

2016-06-06 Thread Milan Bouchet-Valat
Le lundi 06 juin 2016 à 04:08 -0700, FANG Colin a écrit : > I find myself often writing code like this when dealing pop! with a > Dict{A, B} > > > if !haskey(my_dict, key) >     do_something... > end > > value = pop!(my_dict, key) > > do_something_else... > > > The code above has an issue:

Re: [julia-users] Re: julia equivalent of python [] (Part II)

2016-06-01 Thread Milan Bouchet-Valat
Le mercredi 01 juin 2016 à 02:35 -0700, Lutfullah Tomak a écrit : > julia> b_prime = ["8",9,10,c] > > This works with Any. > > julia> Any["3", 4, 14, c] > 4-element Array{Any,1}: >    "3"         >   4            >  14            >    Any[10,"c"] > Yes, for now you need to use that syntax. In

Re: [julia-users] Re: collect([1 2]) in 0.5.0-

2016-05-27 Thread Milan Bouchet-Valat
Le jeudi 26 mai 2016 à 18:41 -0400, Jeff Bezanson a écrit : > > Yes, it would be good to deprecate `collect` to `Vector` (so it > always > returns a vector like it used to), and call `Array` where we want the > result to have the same shape as the iterator. The main wart is that > Array{T}(tuple)

Re: [julia-users] collect([1 2]) in 0.5.0-

2016-05-26 Thread Milan Bouchet-Valat
Le jeudi 26 mai 2016 à 09:03 -0400, Stefan Karpinski a écrit : > Perhaps these should be called Vector and Array? As in Vector(f(x) > for x in A) and Array(f(x) for x in A). Cf. https://github.com/JuliaLang/julia/issues/16029 > On Wed, May 25, 2016 at 7:07 PM, Jeffrey Sarnoff >

Re: [julia-users] DateTime conversion in DataFrames

2016-05-26 Thread Milan Bouchet-Valat
Le jeudi 26 mai 2016 à 06:15 -0700, akrun a écrit : > I am using the DataFrames package.  I find it difficult to convert to > DateTime.  > >       println(DateTime("4/5/2002 04:20", "m/d/y H:M"))  > gives output > >       2002-04-05T04:20:00 > > However, if I try > >   df1 = DataFrame(V1 =

Re: [julia-users] julia equivalent of python [] (aka list)

2016-05-25 Thread Milan Bouchet-Valat
Le mercredi 25 mai 2016 à 02:50 -0700, DNF a écrit : > Is ::Array{Any, 1} the correct annotation? > >> hello(v::Vector{Any}) = println("Hello") > >> hello([2,'a'])  > Hello > >> hello([2,2])  > ERROR: MethodError: no method matching hello(::Array{Int64,1})  >  in eval(::Module, ::Any) at >

Re: [julia-users] Re: Lack of an explicit return in Julia, heartache or happiness?

2016-05-25 Thread Milan Bouchet-Valat
Le mardi 24 mai 2016 à 23:00 -0400, Tom Breloff a écrit : > > if g() returns `nothing` then this code is fine; if g() returns a > > value, then we are accidentally returning it. > > This is the frustrating part for me.   I very frequently have methods > which "do something and then pass control

Re: [julia-users] Gaston package up-and-running in Windows 8/10 with gnuplot utility v5.0 (!!)

2016-05-23 Thread Milan Bouchet-Valat
Le dimanche 22 mai 2016 à 22:19 -0700, Андрей Логунов a écrit : > I've got a Gaston package version up-and-running with Julia 0.4.5 > under Windows 8/10 with gnuplot utility v5.0. And it does run in > Linux/Ubuntu 16.4, too. > A short instruction in the Gaston.jl file.  Just do not know, how to >

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-21 Thread Milan Bouchet-Valat
Le vendredi 20 mai 2016 à 14:24 -0700, Kevin Liu a écrit : > Pkg.update() updated all packages, did the job, thanks. So suppose I > have a dataset called train. R2(train), rˆ2(train), r2(train) didn't > work.  The R² only makes sense for a fitted model. See GLM.jl docs about how to fit it, and

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-20 Thread Milan Bouchet-Valat
Le vendredi 20 mai 2016 à 08:37 -0700, Kevin Liu a écrit : > Pkg.update("GLM") > ERROR: MethodError: `update` has no method matching > update(::ASCIIString) Try Pkg.update(). > > Le jeudi 19 mai 2016 à 19:08 -0700, Kevin Liu a écrit :  > > > Thanks. I might need some help if I encounter problems

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-20 Thread Milan Bouchet-Valat
Le vendredi 20 mai 2016 à 08:59 -0700, Kevin Liu a écrit : > I think accuracy doesn't make sense for a linear model whose purpose > isn't to predict. Do you agree?  Sorry, I don't know what you mean by "accuracy". Anyway, only users know the purpose of their models. All we can do is provide the

Re: [julia-users] Re: Pkg.publish() : ERROR: There are no METADATA changes to publish

2016-05-20 Thread Milan Bouchet-Valat
Le vendredi 20 mai 2016 à 07:14 -0700, Evan Fields a écrit : > On further inspection I think this is because I managed to name the > package repository TravelingSalesmanHeuristics.jl (rather than just > TravelingSalesmanHeuristics). Indeed I just ran > Pkg.add("TravelingSalesmanHeuristics") and

Re: [julia-users] Pkg.publish() : ERROR: There are no METADATA changes to publish

2016-05-20 Thread Milan Bouchet-Valat
Le vendredi 20 mai 2016 à 07:04 -0700, Evan Fields a écrit : > Presumably I'm doing something dumb, but I'm at a loss. I'm trying to > tag version 0.0.2 of TravelingSalesmanHeuristics in METADATA. With my > local machine up to date with the remote github repository, I run > Pkg.update() and

Re: [julia-users] Sharing methods across modules

2016-05-20 Thread Milan Bouchet-Valat
Le vendredi 20 mai 2016 à 05:53 -0700, Christoph Ortner a écrit : > I want to understand how to share methods across modules who don't > know of one another.  I understand that this is discussed in various > places; I tried to go through may issues, but in the end I didn't get > a good picture of

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-20 Thread Milan Bouchet-Valat
Le jeudi 19 mai 2016 à 19:08 -0700, Kevin Liu a écrit : > Thanks. I might need some help if I encounter problems on this pseudo > version.  I've just tagged a new 0.5.2 release, so this shouldn't be necessary now (just run Pkg.update()). Regards > > Le jeudi 19 mai 2016 à 09:30 -0700, Kevin Liu

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-19 Thread Milan Bouchet-Valat
Le jeudi 19 mai 2016 à 09:30 -0700, Kevin Liu a écrit : > It seems the pkg owners are still deciding > > Funcs to evaluate fit                                                 >        https://github.com/JuliaStats/GLM.jl/issues/74 > Add fit statistics functions and document existing ones  

Re: [julia-users] Re: Slow reading of file

2016-05-15 Thread Milan Bouchet-Valat
Le dimanche 15 mai 2016 à 08:08 -0700, Ford Ox a écrit : > Thanks Yu and Quinn. > > Now lets go one step further. Lets say I don't want to use any > default parse function. I will make my own. > > type Buffer{T} x::T end > > function store!(b::Buffer{String}, c::Char) b.x = "$(b.x)$x" end >

Re: [julia-users] Slow reading of file

2016-05-14 Thread Milan Bouchet-Valat
Le samedi 14 mai 2016 à 05:01 -0700, Ford Ox a écrit : > Fixed. Julia now takes 11 seconds to finish > type Tokenizer >     tokens::Array{AbstractString, 1} >     index::Int >     Tokenizer(s::AbstractString) = new(split(strip(s)), 0) > end > > type Buffer >     stream::IOStream >    

Re: [julia-users] Re: NA vs NaN in DataFrames

2016-05-14 Thread Milan Bouchet-Valat
Le samedi 14 mai 2016 à 17:49 +1000, Андрей Логунов a écrit : > using RDatasets, DataFrames > mlmf = dataset("mlmRev","Gcsemv"); > > Produces > > │ 1    │ "20920" │ "16"    │ "M"    │ 23.0    │ NaN    │ > │ 2    │ "20920" │ "25"    │ "F"    │ NaN     │ 71.2   │ > │ 3    │ "20920" │ "27"    │ "F"

Re: [julia-users] Splatting speed

2016-05-13 Thread Milan Bouchet-Valat
Le vendredi 13 mai 2016 à 14:54 -0700, Brandon Taylor a écrit : > I was wondering why the following code is so slow: > > @time broadcast( (x...) -> +(x...), [1:1000], [1001:2000] ) > > In comparison to > > @time broadcast(+, [1:1000], [1001:2000] ) > > and what would be a faster way to define

Re: [julia-users] Match package minor bug, it seems

2016-05-13 Thread Milan Bouchet-Valat
Le vendredi 13 mai 2016 à 00:52 -0700, Андрей Логунов a écrit : > Match package raises a deprecation warning regarding String. > Upon inspection the problem is in the following passage in > matchmacro.jl > > # Regex strings (r"[a-z]*") >     elseif isexpr(expr, :macrocall) && expr.args[1] == >

Re: [julia-users] Re: how long until vectorized code runs fast?

2016-05-12 Thread Milan Bouchet-Valat
Le mercredi 11 mai 2016 à 23:03 -0700, Anonymous a écrit : > In response to both Kristoffer and Keno's timely responses, > > Originally I just did a simple @time test of the form > Matrix .* horizontal vector > > and then tested the same thing with for loops, and the for loops were > way faster

Re: [julia-users] how long until vectorized code runs fast?

2016-05-12 Thread Milan Bouchet-Valat
Le mercredi 11 mai 2016 à 22:22 -0700, Anonymous a écrit : > This remains one of the main drawbacks of Julia, and the devectorize > package is basically useless as it doesn't support some really > crucial vectorized operations.  I'd really prefer not to rewrite all > my vectorized code into nested

Re: [julia-users] using subscripts \_1, \_2, ... as field names

2016-05-10 Thread Milan Bouchet-Valat
Le mardi 10 mai 2016 à 01:56 -0700, Davide Lasagna a écrit : > Hi,  > > I have a custom type representing a bordered matrix (a big square > matrix, bordered by two vectors and a scalar in the bottom right > corner), where the four blocks are stored in separated chunks of > memory. I would like to

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

2016-05-05 Thread Milan Bouchet-Valat
Le dimanche 01 mai 2016 à 19:11 -0700, 'Greg Plowman' via julia-users a écrit : > > Extending/overwriting sort in range.jl (line 686) > > sort(r::Range) = issorted(r) ? r : reverse(r) > > with the following worked for me. > > function Base.sort(r::Range; rev::Bool=false) >     if rev >        

Re: [julia-users] Re: Trouble with parametric parts of a type def

2016-04-29 Thread Milan Bouchet-Valat
Le vendredi 29 avril 2016 à 00:06 -0700, DNF a écrit : > I was going to suggest: > >  type MyType{A<:AbstractArray, T<:Unsigned}  >      data::A{T} >  end > > which does not work. The error is: > ERROR: TypeError: Type{...} expression: expected Type{T}, got TypeVar > > Does anyone know whether

Re: [julia-users] Re: Evaluation of boolean expression fails

2016-04-26 Thread Milan Bouchet-Valat
Le mardi 26 avril 2016 à 13:22 -0400, Yichao Yu a écrit : > On Tue, Apr 26, 2016 at 12:58 PM, Milan Bouchet-Valat wrote: > > > > Le mardi 26 avril 2016 à 12:52 -0400, Yichao Yu a écrit : > > > > > > On Tue, Apr 26, 2016 at 12:09 PM, Ali R

Re: [julia-users] changing the package name

2016-04-26 Thread Milan Bouchet-Valat
Le mardi 26 avril 2016 à 09:17 -0700, Chang Kwon a écrit : > I was wondering what is the proper way to change the package name > under development. This is often the case when I submit a package and > then was recommended to revise the package name. Well, without much > knowledge of git, I always

Re: [julia-users] Re: Evaluation of boolean expression fails

2016-04-26 Thread Milan Bouchet-Valat
Le mardi 26 avril 2016 à 12:52 -0400, Yichao Yu a écrit : > On Tue, Apr 26, 2016 at 12:09 PM, Ali Rezaee wrote: > > > > > > Thanks for your replies. > > My objective is exactly what the code shows. I have a list of Boolean > > expressions similar to the examples in the

Re: [julia-users] Why Ubuntu 16.04 version runs only on one CPU?

2016-04-24 Thread Milan Bouchet-Valat
Le dimanche 24 avril 2016 à 09:43 -0700, K leo a écrit : > Looking through the linear standard functions list in the > documentation, I think perhaps the only function used is linreg.  I > don't directly use LAPACK. > Hmm, doesn't sound like the best candidate. I've made a few attempts, and I

Re: [julia-users] Why Ubuntu 16.04 version runs only on one CPU?

2016-04-24 Thread Milan Bouchet-Valat
Le dimanche 24 avril 2016 à 08:44 -0700, K leo a écrit : > It is hard to know how to describe my code.  So I tried to run it > with the generic version which does use 200% of CPU.  So there seems > something different with the Ubuntu version of Julia. OK. Could you at least make a list of linear

Re: [julia-users] Re: implications of using the precompiled "generic linux binary" vs building julia myself?

2016-04-24 Thread Milan Bouchet-Valat
Le dimanche 24 avril 2016 à 05:26 -0700, K leo a écrit : > I tried that and it seems when I have other versions (the PPA version > for instance) of Julia installed in the system, the shared libs were > mixed up.  When I removed the PPA version, it complained some shared > libs were not found.

Re: [julia-users] Why Ubuntu 16.04 version runs only on one CPU?

2016-04-24 Thread Milan Bouchet-Valat
Le dimanche 24 avril 2016 à 05:38 -0700, K leo a écrit : > > See below. > > > Le samedi 23 avril 2016 à 18:10 -0700, K leo a écrit :  > > > > Le samedi 23 avril 2016 à 04:52 -0700, K leo a écrit :   > > > > Anyway,   > > > > the Ubuntu PPA is no longer maintained. The recommended solution is to  

Re: [julia-users] Re: implications of using the precompiled "generic linux binary" vs building julia myself?

2016-04-24 Thread Milan Bouchet-Valat
Le samedi 23 avril 2016 à 18:23 -0700, K leo a écrit : > I also would like to know about what to do with the lib folder.  Can > someone explain?  There is no README with Linux generic version. You just need to extract the whole contents of the archive somewhere, and run bin/julia. No need to look

Re: [julia-users] Why Ubuntu 16.04 version runs only on one CPU?

2016-04-24 Thread Milan Bouchet-Valat
Le samedi 23 avril 2016 à 18:10 -0700, K leo a écrit : > > Le samedi 23 avril 2016 à 04:52 -0700, K leo a écrit :  > > Anyway,  > > the Ubuntu PPA is no longer maintained. The recommended solution is to  > > use generic Linux binaries from the Julia website.  > > >   > On Ubuntu 16.04, Julia

Re: [julia-users] Why Ubuntu 16.04 version runs only on one CPU?

2016-04-23 Thread Milan Bouchet-Valat
Le samedi 23 avril 2016 à 04:52 -0700, K leo a écrit : > I did some timing measures running the same code.  On Ubuntu 15.10 > where Julia uses 200% of CPU, the code runs in 2500 seconds.  On > Ubuntu 16.04 where Julia takes 100% CPU, the code runs in 2700 > seconds.  I don't know what causes Julia

Re: [julia-users] Re: Function check without @assert

2016-04-22 Thread Milan Bouchet-Valat
Le vendredi 22 avril 2016 à 09:06 -0700, Kristoffer Carlsson a écrit : > It doesn't. You need a quite new master for them.  Actually, these macros don't even exist on git master. No PR has been merged at this stage, and it's no clear what's going to be decided. Regards

Re: [julia-users] Inferrable way of getting element types from tuple of vectors

2016-04-22 Thread Milan Bouchet-Valat
Le vendredi 22 avril 2016 à 09:15 -0400, Yichao Yu a écrit : > On Fri, Apr 22, 2016 at 9:02 AM, Milan Bouchet-Valat wrote: > > > > Hi! Yet more explorations regarding inference and varargs/tuple > > arguments. > > > > I have a function taking a tuple of vectors

[julia-users] Inferrable way of getting element types from tuple of vectors

2016-04-22 Thread Milan Bouchet-Valat
Hi! Yet more explorations regarding inference and varargs/tuple arguments. I have a function taking a tuple of vectors, and I need a way to extract the element types of each of them, in order to create a Dict. The following code works fine, but inference is not able to compute T at compile time:

Re: [julia-users] Function check without @assert

2016-04-22 Thread Milan Bouchet-Valat
Le jeudi 21 avril 2016 à 22:11 -0700, Robert DJ a écrit : > I've become fond of using the @assert macro for checking input to > functions, e.g. > > @assert size(A) == size(B) > @assert x > 0 > > Now I've read discussions like https://github.com/JuliaLang/julia/iss > ues/10614 where I see that

Re: [julia-users] Re: performance of two different array allocations

2016-04-22 Thread Milan Bouchet-Valat
Le jeudi 21 avril 2016 à 13:24 -0700, Andrew a écrit : > I don't get it, but it doesn't like something about concatenating the > number and the array. If you convert the 1 to an array first, it > works. I thought it was because 1 is an integer and you're joining it > with an array of float 0's,

Re: [julia-users] promotion vs. specialization

2016-04-21 Thread Milan Bouchet-Valat
Le jeudi 21 avril 2016 à 11:00 -0400, Yichao Yu a écrit : > On Thu, Apr 21, 2016 at 10:55 AM, Stefan Karpinski wrote: > > > > This is probably more of a julia-dev topic, but my gut reaction is that the > > combination of multiple dispatch and implicit conversion would be chaos. > > Following

Re: [julia-users] Creating symbols

2016-04-21 Thread Milan Bouchet-Valat
Le jeudi 21 avril 2016 à 03:40 -0700, Jeffrey Sarnoff a écrit : > I understand making a pull request.  I don't know how to set up code > to deprecate something in that context. That's pretty easy. Have a look at the comments at the top of base/deprecated.jl. Regards > > I meant AST analysis not

Re: [julia-users] Creating symbols

2016-04-21 Thread Milan Bouchet-Valat
Le mercredi 20 avril 2016 à 22:57 -0700, Tomas Lycken a écrit : > I am all for changing this, but in the specific case of symbol/Symbol > this is going to be massively breaking, and even if the fix is pretty > simple (applying s/symbol\(/Symbol\(/ probably fixes 99% of the code) > the timing needs

Re: [julia-users] Re: Ambiguous method definitions

2016-04-20 Thread Milan Bouchet-Valat
Le mercredi 20 avril 2016 à 08:50 -0700, Robert Gates a écrit : > I wonder if this should be an issue in julia itself. Perhaps it would > be good to require at least one argument? There has been some discussion about syntax to specify a minimum and maximum number of arguments. But nothing has been

Re: [julia-users] Re: macros design

2016-04-20 Thread Milan Bouchet-Valat
Le mercredi 20 avril 2016 à 16:22 +0100, Didier Verna a écrit : > Milan Bouchet-Valat <nalimi...@club.fr> wrote: > > > > > OTOH, short-circuit operators are in limited number (&& and ||). > > Packages authors cannot create new ones without the user knowing &

Re: [julia-users] Re: macros design

2016-04-20 Thread Milan Bouchet-Valat
Le mercredi 20 avril 2016 à 15:34 +0100, Didier Verna a écrit : > Matt Bauman wrote: > > > > > It's nice for both humans (it's obvious that there could be some > > non-standard evaluation semantics or other such funniness) >   Maybe for /some/ humans ;-), but I don't like

Re: [julia-users] Re: Rounding to zero from positive or negative numbers results in positive or negative zero.

2016-04-20 Thread Milan Bouchet-Valat
Le mardi 19 avril 2016 à 22:10 -0700, Jeffrey Sarnoff a écrit : > Hi, > > You have discovered that IEEE standard floating point numbers have > two distinct zeros: 0.0 and -0.0.  They compare `==` even though they > are not `===`.  If you want to consider +0.0 and -0.0 to be the same, > use `==`

Re: [julia-users] Re: Type inference on the length of varargs

2016-04-19 Thread Milan Bouchet-Valat
Le mardi 19 avril 2016 à 06:58 -0700, Matt Bauman a écrit : > That's https://github.com/JuliaLang/julia/pull/11242.  Another common > workaround is a generated function (but the wrapper function is > better if you don't need other generated functionality): > > @generated function f(x...) >     N

[julia-users] Type inference on the length of varargs

2016-04-19 Thread Milan Bouchet-Valat
Hi! I'm looking for the recommended way of getting type inference to determine the number of elements passed via varargs. I guess a code snippet is better than a thousand words: in the following function, the type of a isn't inferred correctly. function f(x...)     N = length(x)     a =

  1   2   3   4   5   6   >