Re: [julia-users] Got an exception of type ErrorException outside of a @test: type DataType has no field FactorMargin

2016-11-17 Thread David P. Sanders
If you can produce a minimal working example (the *shortest* piece of code that produces the problem and that people can run), you will be more likely to get help. This probably involves removing a lot of stuff from your code that I'd not relevant to this particular problem.

Re: [julia-users] problem when include code in Julia

2016-11-17 Thread David P. Sanders
How did you save the .jl file? It seems your editor added the extra .txt suffix. You might want to try a different editor that is designed for editing code, e.g. Atom.

[julia-users] Graphs.jl to plot graphs in Jupyter notebooks?

2016-11-11 Thread David P. Sanders
Use LightGraphs.jl I believe that Graphs.jl is deprecated.

[julia-users] Re: Value assignment of compound expression

2016-11-10 Thread David P. Sanders
El jueves, 10 de noviembre de 2016, 0:43:19 (UTC-5), wan...@terpmail.umd.edu escribió: > > > > Hi guys, > > I am new to Julia and learning from scratch. I ran into the compound > expression like this: > > > tri=base=5;height=10;1/2*base*height > > > This is to calculate the triangle area. The

[julia-users] Re: How to built an array with some keys of a dictionary ?

2016-11-09 Thread David P. Sanders
El lunes, 7 de noviembre de 2016, 9:18:03 (UTC-5), Steven G. Johnson escribió: > > > > On Monday, November 7, 2016 at 9:02:44 AM UTC-5, Fred wrote: >> >> Hi, >> >> I have many problems to build arrays with the keys of a dictionary except >> for the simple situation : >> >> a = [uppercase(key)

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

2016-11-06 Thread David P. Sanders
El domingo, 6 de noviembre de 2016, 15:18:03 (UTC-5), Alberto Barradas escribió: > > 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

[julia-users] Root finding package

2016-10-15 Thread David P. Sanders
https://github.com/giordano/PolynomialRoots.jl

Re: [julia-users] Re: Julia-i18n logo proposal

2016-10-03 Thread David P. Sanders
Or just remove the J and put the three characters from the other scripts?

[julia-users] Re: if-elseif-else programmatically

2016-09-24 Thread David P. Sanders
El sábado, 24 de septiembre de 2016, 21:26:52 (UTC+2), lapeyre@gmail.com escribió: > > I want to generate something like an if-elseif-else construct or > switch-case programmatically. > > The use I have in mind is to write an expression for taking a step in a > random walk in n

Re: [julia-users] Re: Visualizing a Julia AST (abstract syntax tree) as a tree

2016-09-22 Thread David P. Sanders
hs.jl doesn't support labelled graphs, maybe https://github.com/JuliaGraphs/Networks.jl is the right solution? Do you have any suggestions about this? > > Tom > > On Thu, Sep 22, 2016 at 10:12 AM, David P. Sanders <dpsa...@gmail.com > > wrote: > >> >

[julia-users] Re: Visualizing a Julia AST (abstract syntax tree) as a tree

2016-09-22 Thread David P. Sanders
<https://lh3.googleusercontent.com/-mtiBFUuqKww/V-Pmryhi8ZI/F6g/Gt-E1jDC_sECP6JTp1NIjWnoi1Gd6gOpgCLcB/s1600/Screen%2BShot%2B2016-09-21%2Bat%2B5.25.35%2BPM.png> Here's an example of the output. El miércoles, 21 de septiembre de 2016, 17:24:52 (UTC-4), David P. Sanders es

[julia-users] Visualizing a Julia AST (abstract syntax tree) as a tree

2016-09-21 Thread David P. Sanders
Hi, In case it's useful for anybody, the following notebook shows how to use the LightGraphs and TikzGraphs packages to visualize a Julia abstract syntax tree (Expression object) as an actual tree: https://gist.github.com/dpsanders/5cc1acff2471d27bc583916e00d43387 Currently it requires the

[julia-users] What is the best way to element-wise right shift an array?

2016-09-18 Thread David P. Sanders
You should also benchmark the simple for loop. Please report back with the results.

[julia-users] Re: Pkg.add() works fine while Pkg.update() doesn't over https instead of git

2016-09-14 Thread David P. Sanders
I am a fan of deleting the entire .julia directory in your home directory and reinstalling your packages. You can also just keep the REQUIRE file from .julia/v0.4 somewhere, do Pkg.init(), then copy the REQUIRE file back and do Pkg.resolve() to reinstall everything you previously had

[julia-users] Re: online (streaming) statistics?

2016-09-14 Thread David P. Sanders
Apparently the problem was using "julialang" instead of just "julia" in the search. julialang will, I guess, mainly pick up things on the Julia language home page, whereas you were looking for an external package. El miércoles, 14 de septiembre de 2016, 12:12:06 (UTC-

[julia-users] Re: online (streaming) statistics?

2016-09-14 Thread David P. Sanders
El miércoles, 14 de septiembre de 2016, 12:02:32 (UTC-4), Neal Becker escribió: > > David P. Sanders wrote: > > > > > > > > > El miércoles, 14 de septiembre de 2016, 11:45:00 (UTC-4), Neal Becker > > escribió: > >> > >

[julia-users] Re: Curious parsing behavior

2016-09-14 Thread David P. Sanders
El miércoles, 14 de septiembre de 2016, 11:12:52 (UTC-4), David Gleich escribió: > > Ahah! That explains it. > > Is there a better way to create floating point literals that avoid this? > I think using 1782.0 instead of 1782. (without the 0) will solve this? I seem to remember there was an

[julia-users] Re: online (streaming) statistics?

2016-09-14 Thread David P. Sanders
El miércoles, 14 de septiembre de 2016, 11:45:00 (UTC-4), Neal Becker escribió: > > Is there a package for online (streaming) statistics? > Please use Google before posting questions like this. Googling "online streaming statistics Julia" gives the answer as the first link. > > This

[julia-users] Re: Priority queue - peek versus dequeue!

2016-09-13 Thread David P. Sanders
El martes, 13 de septiembre de 2016, 17:16:19 (UTC-4), Júlio Hoffimann escribió: > > Hi, > > Could you explain why "peek" returns the pair (key,value) whereas > "dequeue!" only returns the key? > > using Base.Collections > pq = PriorityQueue() > enqueue!(pq, key, value) > key, value =

[julia-users] Re: Pkg.update() does not pull latest version?

2016-09-06 Thread David P. Sanders
El martes, 6 de septiembre de 2016, 14:17:28 (UTC-4), Tony Kelman escribió: > > I hate to have to say "RTFM" about this so often, but see > http://docs.julialang.org/en/release-0.4/manual/strings/#version-number-literals. > > The trailing dash means including prereleases of the given

[julia-users] printf format for round-trip Floats

2016-09-02 Thread David P. Sanders
The simple solutions are often the most elusive!

[julia-users] printf format for round-trip Floats

2016-09-02 Thread David P. Sanders
Can't you just use string(x) where x is the Float64?

[julia-users] Re: BigInt / BigFloat / Bitshift

2016-08-10 Thread David P. Sanders
El miércoles, 10 de agosto de 2016, 18:20:11 (UTC-4), digxx escribió: > > As far as I understand Julia adjusts the bitsize of an integer when I use > BigInt. > For example n=big(10)^1 is as many bits as needed. > Now 2*n is still an integer though dividing makes a bigfloat out of it. > How

[julia-users] Anonymous Functions in 0.5 - Performance

2016-08-01 Thread David P. Sanders
Don't do benchmarks in global scope. Wrap everything in a function.

[julia-users] Re: How to make a variable length tuple with inferred type

2016-07-31 Thread David P. Sanders
El domingo, 31 de julio de 2016, 20:16:04 (UTC-4), Sheehan Olver escribió: > > I'm doing the following: > > > immutable FooIterator{d} end > > Base.start(::FooIterator{d}) = tuple(zeros(Int,d)...)::NTuple{d,Int} > You can use the `ntuple` function, which constructs a tuple from a function:

[julia-users] Re: Tuple type to tuple of types

2016-07-24 Thread David P. Sanders
El domingo, 24 de julio de 2016, 7:52:47 (UTC-4), jw3126 escribió: > > I need a function, which accepts an arbitrary tuple type and returns the > types of the components of the tuple. For example > ``` > f(Tuple{Int64, Float64})--> (Int64, Float64) > f(Tuple{Int64, MyType,

[julia-users] Re: JuliaCon schedule announced

2016-07-21 Thread David P. Sanders
Thanks! El jueves, 21 de julio de 2016, 17:26:09 (UTC+2), Viral Shah escribió: > > Both these tutorials are up now. The others seem are there. > > -viral > > On Sunday, July 17, 2016 at 1:00:17 AM UTC-4, Tony Kelman wrote: >> >> I don't see the tutorial that David Sanders gave, or the one that I

[julia-users] Re: Fast higher order differentiation

2016-07-17 Thread David P. Sanders
ivided by 40!. (The nth Taylor coefficient is f^{(n)} / n!. ) El domingo, 17 de julio de 2016, 21:15:33 (UTC+2), David P. Sanders escribió: > > > > El domingo, 17 de julio de 2016, 17:13:38 (UTC+2), Young Chun escribió: >> >> I have an optimization problem that involves

[julia-users] Re: Fast higher order differentiation

2016-07-17 Thread David P. Sanders
El domingo, 17 de julio de 2016, 17:13:38 (UTC+2), Young Chun escribió: > > I have an optimization problem that involves series of high order > derivatives of f(x). > So, to get a decent value, I need to calculate higher order derivative at > least to 40~50th order. > I suggest you use

[julia-users] Re: Suddenly PyPlot giving me grief

2016-07-12 Thread David P. Sanders
As a quick solution, I would suggest deleting or renaming ~/.julia/v0.4 and reinstalling all the packages. El martes, 12 de julio de 2016, 8:11:53 (UTC-4), Ed Scheinerman escribió: > > I've suddenly been having a great deal of trouble with PyPlot on Julia > 0.4.6 on Mac. > > Here's one sort

[julia-users] Docs unavailable?

2016-07-11 Thread David P. Sanders
Seems to be working now.

[julia-users] Recover lost script from active command line session

2016-07-11 Thread David P. Sanders
Type ctrl-R in the repl and start to type include. This will give you the last command by that name that you typed and will show you which file you included. You can do pwd() to show which directory you are working in.

[julia-users] Re: how to hide deprecated warning ?

2016-06-30 Thread David P. Sanders
El jueves, 30 de junio de 2016, 10:20:49 (UTC-4), Henri Girard escribió: > > I am not a developper, I can't help to correct > these warning (unfortunatly) but that's > quiet annoying if one wants to make a clean > worksheet, this one is not too big but > sometimes it's half a page ! > > >

[julia-users] Speeding up Matrix .^ transpose(Vector)

2016-06-30 Thread David P. Sanders
Have you tried rewriting with explicit loops?

[julia-users] Re: JuliaCon schedule announced

2016-06-25 Thread David P. Sanders
El viernes, 24 de junio de 2016, 13:44:32 (UTC-4), Alex Coventry escribió: > > I would like to attend the hackathon tomorrow (Sat Jun 25.) I'd be > grateful for a pointer to where / when it's going to be. > It will be at the Stata Center at MIT -- see http://juliacon.org/#location starting

Re: [julia-users] Re: PyPlot: LineCollection help needed

2016-06-14 Thread David P. Sanders
Great stuff, Tom!

[julia-users] Re: PyPlot: LineCollection help needed

2016-06-11 Thread David P. Sanders
After looking at some matplotlib examples, it seems that the data structure needed by LineCollection in Python is a list of lists, with the inner lists being lists of (x,y) pairs. After playing around for a while, the following works for me for drawing a pair of lines in Julia: xs = [1., 3.,

[julia-users] PyPlot: LineCollection help needed

2016-06-10 Thread David P. Sanders
Does it work with ax=gca() instead?

[julia-users] Re: How to get the particular value from the table

2016-06-07 Thread David P. Sanders
El martes, 7 de junio de 2016, 11:57:16 (UTC-4), tann...@gmail.com escribió: > > Hello, > > If I have this kind of table attached here. How can I access the > particular value to use in problem after importing in the julia. Thank you > How do you import the data into Julia?

[julia-users] Re: given two strings, find the index of the first nonmatching character

2016-06-06 Thread David P. Sanders
Wrapped in a function, obviously. El lunes, 6 de junio de 2016, 19:41:10 (UTC-4), David P. Sanders escribió: > > > > El lunes, 6 de junio de 2016, 18:53:46 (UTC-4), Jeffrey Sarnoff escribió: >> >> ``` >> indexOfFirstNonmatching("abcd","abcd") ==

[julia-users] Re: given two strings, find the index of the first nonmatching character

2016-06-06 Thread David P. Sanders
El lunes, 6 de junio de 2016, 18:53:46 (UTC-4), Jeffrey Sarnoff escribió: > > ``` > indexOfFirstNonmatching("abcd","abcd") == 0 > indexOfFirstNonmatching("abcd","abdc") == 3 > ``` > what is a fast way to do this with strings of 50-1000 characters? > How about s1 = "abcd" s2 = "abdc" for

[julia-users] Re: Help creating user-defined types and constructors

2016-06-04 Thread David P. Sanders
El sábado, 4 de junio de 2016, 18:18:00 (UTC-4), Christopher Fisher escribió: > > Ok. I didn't anticipate this would be a drawn out process. I just Ford's > suggestion fixed the issue of changing values but recreated the problem of > accessing an individual's information like so:

[julia-users] Re: ANN: PkgSearch - a REPL utility for package discovery

2016-06-04 Thread David P. Sanders
El viernes, 3 de junio de 2016, 16:40:50 (UTC-4), Adrian Salceanu escribió: > > Hi, > > I have released PkgSearch, a small REPL utility for package discovery. > > Very nice work! > Package discovery seemed to be a recurring issue, with many related > questions - and I can still remember

[julia-users] Re: Help creating user-defined types and constructors

2016-06-04 Thread David P. Sanders
You can define a `Population` type and overload `getindex` for it to do what you want, something like: type Person infected::Bool vaccinated::Bool dead::Bool history::Vector{Int} end type Population <: AbstractArray individuals::Vector{Person} end Population() =

[julia-users] Re: parametrized type with inner constructor fails

2016-06-03 Thread David P. Sanders
El viernes, 3 de junio de 2016, 22:06:20 (UTC-4), xdavidliu escribió: > > with > > > type foo > x::Int > foo(x) = x > 0 ? new(x) : new(-x) > end > > > type bar{T<:Integer} > x::T > end > > > type baz{T<:Integer} > x::T > baz(x) = x > 0 ? new(x) : new(-x) > end > > > >

[julia-users] Re: random number generation

2016-06-01 Thread David P. Sanders
El miércoles, 1 de junio de 2016, 14:24:01 (UTC-4), Michela Di Lullo escribió: > > How can I do to generate 6 *different* integer random numbers between 1 > and 14? > This is known as "sampling without replacement" and is implemented in StatsBase.jl; documentation here:

[julia-users] Re: Why these 2 functions generate very different llvm?

2016-05-30 Thread David P. Sanders
El lunes, 30 de mayo de 2016, 19:11:47 (UTC-4), FANG Colin escribió: > > function t1(n::Int, x::Int, a::Float64) >x::Float64 = x >for i in 1:n > x += a >end > x > end > @time t1(10^6, 1, 1.0) > > 0.005445 seconds (1.00 M allocations: 15.259 MB) > In t1, x changes type

[julia-users] Re: frame

2016-05-20 Thread David P. Sanders
El viernes, 20 de mayo de 2016, 20:12:22 (UTC+1), Henri Girard escribió: > > Hi, > I would like to make a frame in julia pyplot graphic 2D > I tried set_frame_on but nothing display idem for border=:on > Is there a command ? > What is a frame? What is the matplotlib command for this? For

[julia-users] Re: Base.show(io::IO, mytype::Type) results in cluttered display for arrays

2016-05-16 Thread David P. Sanders
ould get rid of these. > > On Monday, May 16, 2016 at 1:40:06 AM UTC-7, David P. Sanders wrote: >> >> Change the print statement to print(io, "..."). io is the object of type >> IO that you need to print to. > >

[julia-users] Base.show(io::IO, mytype::Type) results in cluttered display for arrays

2016-05-16 Thread David P. Sanders
Change the print statement to print(io, "..."). io is the object of type IO that you need to print to.

[julia-users] Re: Julia large project example.

2016-05-12 Thread David P. Sanders
In this example you can easily create another, distinct, object of the same type with a2=Apple().

Re: [julia-users] Re: [ANN] CmplxRoots.jl: Fast Complex Polynomial Root Finder

2016-04-29 Thread David P. Sanders
El jueves, 28 de abril de 2016, 16:09:54 (UTC-4), Mosè Giordano escribió: > > Hi David, > > 2016-04-28 14:10 GMT+02:00 David P. Sanders <dpsa...@gmail.com > >: > > As far as I could see, the original library has an Apache license, so > you should be able t

Re: [julia-users] Re: [ANN] CmplxRoots.jl: Fast Complex Polynomial Root Finder

2016-04-28 Thread David P. Sanders
As far as I could see, the original library has an Apache license, so you should be able to use MIT. I believe that you need to include a copy of the original license in your package? +1 for ComplexRoots.jl

Re: [julia-users] Re: automatic export of all enum values

2016-04-26 Thread David P. Sanders
Thanks. Tricky!

Re: [julia-users] In these two ways to "create functions", which one is a better way?

2016-04-20 Thread David P. Sanders
If this is your actual use case, then I suggest checking out the Polynomials.jl package. In particular, there is a more efficient algorithm (Horner's algorithm) that you can use to actually evaluate such a function.

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

2016-04-20 Thread David P. Sanders
You can avoid the problem using round(Int, x) Which returns the result as an integer. Integers do not have this situation (difference between +0.0 and -0.0)

Re: [julia-users] How to apply an array of functions to an array of values?

2016-02-22 Thread David P. Sanders
An alternative is a comprehension: [f(x) for (f,x) in zip(funs, vals)] El lunes, 22 de febrero de 2016, 16:29:21 (UTC-5), Stefan Karpinski escribió: > > Using a lambda works: > > julia> funs = [sin,cos,tan] > 3-element Array{Function,1}: > sin > cos > tan > > julia> vals = rand(3) >

[julia-users] Re: Json and enums

2016-02-21 Thread David P. Sanders
El domingo, 21 de febrero de 2016, 9:35:54 (UTC-5), Eric Forgy escribió: > > julia> @enum Test T1 T2 T3 > > julia> JSON.json(T1) > "{}" > > How can I get this to print "\"T1\""? > > I've been experimenting with "show" and "print", but can't seem to get it > to work. > > Thanks for any help. > >

[julia-users] Re: recommended graphics packages for multiple curves on a single canvas

2016-02-01 Thread David P. Sanders
With PyPlot it should be as simple as using PyPlot x = 0:0.01:1 plot(x, sin(x)) plot(x, cos(x)) Does this not work? El domingo, 31 de enero de 2016, 21:53:30 (UTC-6), Michael Landis escribió: > > Can anyone recommend a graphics capable of plotting multiple curves on a > single canvas.

Re: [julia-users] How to construct without push! vector of vectors?

2016-01-05 Thread David P. Sanders
El martes, 5 de enero de 2016, 15:08:28 (UTC-6), Jamie Brandon escribió: > > julia> Vector[[1,2], [3, 4]] > 2-element Array{Array{T,1},1}: > [1,2] > [3,4] > > julia> [[1,2] [3,4]] > 2x2 Array{Int64,2}: > 1 3 > 2 4 > > julia> [[1,2], [3,4]] > WARNING: [a,b] concatenation is

Re: [julia-users] How to: grep an Array of strings

2015-12-03 Thread David P. Sanders
El jueves, 3 de diciembre de 2015, 13:54:01 (UTC-6), Erik Schnetter escribió: > > You are looking for `filter`: > > filter(line->match(r"parameter", line), rLines) > Apparently this needs to be filter(line->ismatch(r"3", line) != nothing, rLines) (replace "match" with "ismatch" to get a

Re: [julia-users] float(X) vs. map(Float64, X)

2015-11-29 Thread David P. Sanders
NaNs are not equal to each other.

[julia-users] Re: tip for using Julia on OS X

2015-11-28 Thread David P. Sanders
El sábado, 28 de noviembre de 2015, 15:00:50 (UTC-6), Kevin Owens escribió: > > tl;dr: how to make a symbolic link in OS X. > > So, if you don't want to build Julia from source, you can download the > .app on OS X. For me, this doesn't work well because it opens Terminal when > I double click

[julia-users] Re: Better alternative to find all permutations?

2015-11-19 Thread David P. Sanders
El jueves, 19 de noviembre de 2015, 14:45:41 (UTC-6), Ratan Sur escribió: > > I want to get all the unique permutations of an array of a certain length > and this is the only way I currently know how to do it in one line. Is > there a builtin function for this? > > julia>

Re: [julia-users] display precision

2015-11-15 Thread David P. Sanders
El domingo, 15 de noviembre de 2015, 12:45:11 (UTC-6), Yichao Yu escribió: > > On Sun, Nov 15, 2015 at 1:25 PM, digxx > wrote: > > Is it possible to display the precision of a number to arbitrary > decimals > > points? > > For example if I want to display pi (or any

[julia-users] Re: push! performance

2015-11-15 Thread David P. Sanders
El domingo, 15 de noviembre de 2015, 18:00:09 (UTC-6), David P. Sanders escribió: > > > > El domingo, 15 de noviembre de 2015, 17:35:45 (UTC-6), Steven G. Johnson > escribió: >> >> function prealloc(n) >> a = Array(Int, n) >> for i = 1:n >&

[julia-users] Re: push! performance

2015-11-15 Thread David P. Sanders
El domingo, 15 de noviembre de 2015, 17:35:45 (UTC-6), Steven G. Johnson escribió: > > function prealloc(n) > a = Array(Int, n) > for i = 1:n > a[i] = i > end > return a > end > function dynamic(n) > a = Int[] > for i = 1:n > push!(a, i) > end >

[julia-users] Re: Creating a stable version of Julia + Packages for a semester long course?

2015-11-15 Thread David P. Sanders
El domingo, 15 de noviembre de 2015, 21:05:45 (UTC-6), Sheehan Olver escribió: > > > I'm trying to figure out the "best" way to create a stable version of > Julia + Gadfly + PyPlot + IJulia (+ other packages?) for a semester long > course. I don't want to have the students run

[julia-users] Re: line numbers in Jupyter

2015-11-03 Thread David P. Sanders
You can also use Ctrl-m instead of escape. So it would be Ctrl-m, followed by lower case L.

[julia-users] Re: Creating variables programmatically

2015-11-03 Thread David P. Sanders
El martes, 3 de noviembre de 2015, 10:27:27 (UTC-6), Dawid Crivelli escribió: > > How about using a dictionary instead of variables, to do something like > the following: > > images = Dict{AbstractString, Image}() # dictionary associating an > Image object to a string > image["flower"] =

Re: [julia-users] help with a macro to stringize high precision floating point values

2015-11-02 Thread David P. Sanders
y, will your Float128 library be correctly-rounded? > > On Monday, November 2, 2015, David P. Sanders <dpsa...@gmail.com > > wrote: > >> >> >> El lunes, 2 de noviembre de 2015, 6:35:46 (UTC-6), Milan Bouchet-Valat >> escribió: >>> >>> Le

Re: [julia-users] help with a macro to stringize high precision floating point values

2015-11-02 Thread David P. Sanders
El lunes, 2 de noviembre de 2015, 6:35:46 (UTC-6), Milan Bouchet-Valat escribió: > > Le lundi 02 novembre 2015 à 00:58 -0800, Jeffrey Sarnoff a écrit : > > I have many values like > > 0.6584871727288045313850172023417636020375045372547107712468813403 > > that come from Maple and I would

[julia-users] Re: Anyone know how to get help with Jupyter?

2015-10-31 Thread David P. Sanders
El sábado, 31 de octubre de 2015, 14:57:01 (UTC-6), Daniel Carrera escribió: > > I apologize for asking a non-Julia question here, but for the life of me I > cannot figure out how to contact the people working on Jupyter so I can ask > them a question: > > http://jupyter.org/index.html > You

[julia-users] Re: array of empty arrays and data types

2015-10-30 Thread David P. Sanders
El viernes, 30 de octubre de 2015, 7:12:39 (UTC-6), Cameron Zachreson escribió: > > Hello, > > Just started using Julia and I've come across an issue trying to create > and append values to arrays of empty arrays. > If you specify a bit more precisely what you are trying to do, it will be

[julia-users] Re: PyPlot histogram does not work (for me at least) in 0.4.0 (?)

2015-10-26 Thread David P. Sanders
Apologies, this seems to have changed recently -- PyPlot no longer overwrites Base.hist. You can do plt[:hist]

[julia-users] Re: PyPlot histogram does not work (for me at least) in 0.4.0 (?)

2015-10-26 Thread David P. Sanders
If you do `using PyPlot` then you can just use `hist` directly: using PyPlot x = randn(1) hist(x, 100) El lunes, 26 de octubre de 2015, 10:21:59 (UTC-6), Ferran Mazzanti escribió: > > Oh, thnks for the info... > > On Monday, October 26, 2015 at 12:25:26 PM UTC+1, Kristoffer Carlsson >

[julia-users] Re: PyPlot histogram does not work (for me at least) in 0.4.0 (?)

2015-10-26 Thread David P. Sanders
(You then must call Base.hist if you want the version from Base.) El lunes, 26 de octubre de 2015, 23:13:23 (UTC-6), David P. Sanders escribió: > > > If you do `using PyPlot` then you can just use `hist` directly: > > using PyPlot > > x = randn(1) > hist(x, 100) >

[julia-users] Re: IJulia notebook porting from one kernel to another

2015-10-18 Thread David P. Sanders
In the Kernel menu, you can change the kernel to whichever kernel you would like to use. Then save the notebook, and the next time you open it, it will automatically open with the new kernel. (Note that this assumes you are using IPython / Jupyter at least version 3. If you are not, you

[julia-users] Re: IPython keeps giving Kernel error

2015-10-07 Thread David P. Sanders
You could try with the latest Julia 0.4 release candidate. Have you tried deleting your whole .julia directory and reinstalling IJulia?

[julia-users] Re: Opening Julia files on IJulia?

2015-10-05 Thread David P. Sanders
, 14:53:07 (UTC-5), David P. Sanders escribió: > > Actually in the latest versions of the notebook (maybe just Jupyter 4? or > maybe IPython 3 too), you can just open a normal file by clicking on its > name > from the Notebook dashboard. This will drop you into a CodeMirror

[julia-users] Re: Opening Julia files on IJulia?

2015-10-05 Thread David P. Sanders
Actually in the latest versions of the notebook (maybe just Jupyter 4? or maybe IPython 3 too), you can just open a normal file by clicking on its name from the Notebook dashboard. This will drop you into a CodeMirror editor just as if it were a code cell, and you can edit and save the file.

[julia-users] Re: Old Julia profiles in Jupyter session

2015-10-05 Thread David P. Sanders
El lunes, 5 de octubre de 2015, 16:19:51 (UTC-5), Júlio Hoffimann escribió: > > Hi, > > Whenever I update Julia I see a new profile in my Jupyter session. How to > delete all these old versions in the attached screenshot? > > >

Re: [julia-users] Variable number of parameters types in a function

2015-10-04 Thread David P. Sanders
El domingo, 4 de octubre de 2015, 15:45:19 (UTC-5), data.pu...@gmail.com escribió: > > Hi Tom, > > I am looking for something analogous to a C++ variadic template function > where the types as well as the arguments to the function are varags. These > are aligned so that in my above notation

[julia-users] Re: Nicer syntax collect(linspace(0,1,n))?

2015-10-01 Thread David P. Sanders
El martes, 29 de septiembre de 2015, 17:44:43 (UTC-5), feza escribió: > > In matlab x = linspace(0,1,n) creates a vector of floats of length n. In > julia it seems like the only way to do this is to use x = collect( > linspace(0,1,n) ) . Is there a nicer syntax? I do mainly numeric computing

[julia-users] Default Ipython profile in Ijulia

2015-09-19 Thread David P. Sanders
Hi, Which version if the (ipython / jupyter) notebook do you have? It sounds like it's at least 3. (The one that lets you choose between different kernels.) In that case, you should no longer put the --profile, i.e. Just run ipython notebook David

Re: [julia-users] Run gcc in build.jl

2015-09-18 Thread David P. Sanders
- build the package(s) and all dependencies with `Pkg.build("CRlibm")` - build a single package by running its `deps/build.jl` script > > ? > > -Mike > &g

[julia-users] Run gcc in build.jl

2015-09-17 Thread David P. Sanders
Hi, I am almost ready to release a simple wrapper of the CRlibm library: see https://github.com/dpsanders/CRlibm.jl The last (?) step I need is to get the gcc command in the below build script in deps/build.jl to work. Could somone please suggest how to do this? The problem is that *.o is not

[julia-users] Re: [ANN] FixedSizeArrays

2015-09-05 Thread David P. Sanders
El sábado, 5 de septiembre de 2015, 22:09:20 (UTC+1), Simon Danisch escribió: > > Hi everyone, > > FixedSizeArrays offers > an abstract interface to turn arbitrary types into arrays of fixed size > with most array functionality defined. >

[julia-users] Re: Can't use @manipulate in jupyter

2015-08-22 Thread David P. Sanders
Which version of Jupyter / IPython are you using? This is all going through an upheaval at the moment. My guess is that you need Pkg.checkout(Interact) to get the latest version of Interact.jl that works with version 3.0 of the Notebook. (But not, apparently, with the very latest version 4.0

[julia-users] Re: Splitting a multidimensional function

2015-08-21 Thread David P. Sanders
Here is a fun and possibly useful solution (that works only on 0.4 due to call overloading): https://gist.github.com/dpsanders/d8ef239ec8c78c4debee It introduces a `MultidimFunction` type, and a macro `@multidim` that works as follows: julia @multidim f(x) = [sqrt(x[1]), 2x[2]]

[julia-users] Re: complex results - why not automatic type conversion?

2015-07-22 Thread David P. Sanders
How about mysqrt(x::Real) = sqrt(complex(x)) mysqrt(x::Complex) = sqrt(x)

Re: [julia-users] Wrong number of arguments?

2015-07-15 Thread David P. Sanders
El miércoles, 15 de julio de 2015, 14:03:16 (UTC-5), Mauricio Esteban Cuak escribió: Just in case it seems a bit more transparent, this also works: r = rand(5) map( x - x[1] + x[2], enumerate(r)) I personally find the following array comprehension the most transparent option: [i+v for

[julia-users] Help! Trying to install IJulia on 0.3.10, ZMQ fails to load

2015-06-27 Thread David P. Sanders
I usually suggest deleting the .julia directory and installing packaged from scratch.

[julia-users] ANN: ValidatedNumerics v0.1: Interval arithmetic and rigorous root finding

2015-06-25 Thread David P. Sanders
We are pleased to announce the first public release version of the ValidatedNumerics.jl package, a Julia package for doing rigorous calculations using floating-point based interval arithmetic. This includes methods for rigorously finding roots of 1D real functions. To install the package, do

[julia-users] Re: [Slightly OT] Creating JuliaCon presentation slides as a Jupyter notebook

2015-06-22 Thread David P. Sanders
El jueves, 4 de junio de 2015, 9:49:15 (UTC-5), Douglas Bates escribió: The JuliaCon2015 organizers have suggested preparing conference proceedings in the form of Jupyter notebooks, which I think is a great idea. I have considered going further and preparing presentation slides using

[julia-users] Re: Using composite types with many fields

2015-06-20 Thread David P. Sanders
Christoph's solution is neat. Another possibility is to just start with an empty object, by defining an inner constructor that does not define any of the fields, and then fill it up, as you were (IIUC) looking for. As far as I am aware, there is not any problem with doing this. type MyType

Re: [julia-users] inverse function error?

2015-06-18 Thread David P. Sanders
El jueves, 18 de junio de 2015, 22:18:48 (UTC+2), Mauro escribió: I don't know why Y does not get its type inferred correctly. But you Array comprehensions in global scope never (?) have their types inferred. You can try putting the array comprehension inside a function -- this may (or

[julia-users] Hands-on Julia workshop materials

2015-06-17 Thread David P. Sanders
Dear all, I have just finished giving a 2-day Julia workshop in Paris for scientists who already had some knowledge on scientific computing. The materials (Jupyter notebooks) are available at https://github.com/dpsanders/hands_on_julia/ This is somewhat different from most previous materials,

[julia-users] How to deploy Julia

2015-06-14 Thread David P. Sanders
Out of interest, does your code use arrays (for positions if the particles etc?) If so, does it use standard Julia arrays? David

[julia-users] Re: Constructing a block diagonal matrix from an array of square matrices

2015-06-03 Thread David P. Sanders
El miércoles, 3 de junio de 2015, 19:07:19 (UTC+2), Marc Gallant escribió: If I have an array of square matrices of different sizes; e.g., 3-element Array{Array{Float64,2},1}: 2x2 Array{Float64,2}: 0.539932 0.429322 0.623487 0.0397795 2x2 Array{Float64,2}: 0.35508 0.700551

  1   2   3   >